Provides text data from resource contents.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public class TextDataAttribute : ContentAttribute |
| Visual Basic (Declaration) |
|---|
Public Class TextDataAttribute _ Inherits ContentAttribute |
Examples
This example reads data from an Embedded Resource called Data.txt within the same namespace as the test fixture.
CopyC#public class AccountingTests
{
[Test]
public void ShoppingCartTotalWithSingleItem([TextData(ResourcePath = "Data.txt")] string data)
{
// Code logic here...
}
}
Inheritance Hierarchy
System..::.Object
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
Gallio.Framework.Pattern..::.DataPatternAttribute
MbUnit.Framework..::.ContentAttribute
MbUnit.Framework..::.TextDataAttribute
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
Gallio.Framework.Pattern..::.DataPatternAttribute
MbUnit.Framework..::.ContentAttribute
MbUnit.Framework..::.TextDataAttribute
