IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.TestCaseData Class Reference

The TestCaseData class represents a set of arguments and other parameter info to be used for a parameterized test case. It is derived from TestCaseParameters and adds a fluent syntax for use in initializing the test case. More...

+ Inheritance diagram for NUnit.Framework.TestCaseData:
+ Collaboration diagram for NUnit.Framework.TestCaseData:

Public Member Functions

 TestCaseData (params object[] args)
 Initializes a new instance of the TestCaseData class. More...
 
 TestCaseData (object arg)
 Initializes a new instance of the TestCaseData class. More...
 
 TestCaseData (object arg1, object arg2)
 Initializes a new instance of the TestCaseData class. More...
 
 TestCaseData (object arg1, object arg2, object arg3)
 Initializes a new instance of the TestCaseData class. More...
 
TestCaseData Returns (object result)
 Sets the expected result for the test More...
 
TestCaseData SetName (string name)
 Sets the name of the test case More...
 
TestCaseData SetDescription (string description)
 Sets the description for the test case being constructed. More...
 
TestCaseData SetCategory (string category)
 Applies a category to the test More...
 
TestCaseData SetProperty (string propName, string propValue)
 Applies a named property to the test More...
 
TestCaseData SetProperty (string propName, int propValue)
 Applies a named property to the test More...
 
TestCaseData SetProperty (string propName, double propValue)
 Applies a named property to the test More...
 
TestCaseData Explicit ()
 Marks the test case as explicit. More...
 
TestCaseData Explicit (string reason)
 Marks the test case as explicit, specifying the reason. More...
 
TestCaseData Ignore (string reason)
 Ignores this TestCase, specifying the reason. More...
 
- Public Member Functions inherited from NUnit.Framework.Internal.TestCaseParameters
 TestCaseParameters ()
 Default Constructor creates an empty parameter set More...
 
 TestCaseParameters (Exception exception)
 Construct a non-runnable ParameterSet, specifying the provider exception that made it invalid. More...
 
 TestCaseParameters (object[] args)
 Construct a parameter set with a list of arguments More...
 
 TestCaseParameters (ITestCaseData data)
 Construct a ParameterSet from an object implementing ITestCaseData More...
 
- Public Member Functions inherited from NUnit.Framework.Internal.TestParameters
 TestParameters ()
 Default Constructor creates an empty parameter set More...
 
 TestParameters (object[] args)
 Construct a parameter set with a list of arguments More...
 
 TestParameters (Exception exception)
 Construct a non-runnable ParameterSet, specifying the provider exception that made it invalid. More...
 
 TestParameters (ITestData data)
 Construct a ParameterSet from an object implementing ITestData More...
 
void ApplyToTest (Test test)
 Applies ParameterSet _values to the test itself. More...
 

Additional Inherited Members

- Properties inherited from NUnit.Framework.Internal.TestCaseParameters
object ExpectedResult [get, set]
 The expected result of the test, which must match the method return type. More...
 
bool HasExpectedResult [get, set]
 Gets a value indicating whether an expected result was specified. More...
 
- Properties inherited from NUnit.Framework.Internal.TestParameters
RunState RunState [get, set]
 The RunState for this set of parameters. More...
 
object[] Arguments [get, set]
 The arguments to be used in running the test, which must match the method signature. More...
 
string TestName [get, set]
 A name to be used for this test case in lieu of the standard generated name containing the argument list. More...
 
IPropertyBag Properties [get, private set]
 Gets the property dictionary for this test More...
 
object[] OriginalArguments [get, private set]
 The original arguments provided by the user, used for display purposes. More...
 
- Properties inherited from NUnit.Framework.Interfaces.ITestData
string TestName [get]
 Gets the name to be used for the test More...
 
RunState RunState [get]
 Gets the RunState for this test case. More...
 
object[] Arguments [get]
 Gets the argument list to be provided to the test More...
 
IPropertyBag Properties [get]
 Gets the property dictionary for the test case More...
 
- Properties inherited from NUnit.Framework.Interfaces.ITestCaseData
object ExpectedResult [get]
 Gets the expected result of the test case More...
 
bool HasExpectedResult [get]
 Returns true if an expected result has been set More...
 

Detailed Description

The TestCaseData class represents a set of arguments and other parameter info to be used for a parameterized test case. It is derived from TestCaseParameters and adds a fluent syntax for use in initializing the test case.

Constructor & Destructor Documentation

NUnit.Framework.TestCaseData.TestCaseData ( params object[]  args)
inline

Initializes a new instance of the TestCaseData class.

Parameters
argsThe arguments.
NUnit.Framework.TestCaseData.TestCaseData ( object  arg)
inline

Initializes a new instance of the TestCaseData class.

Parameters
argThe argument.
NUnit.Framework.TestCaseData.TestCaseData ( object  arg1,
object  arg2 
)
inline

Initializes a new instance of the TestCaseData class.

Parameters
arg1The first argument.
arg2The second argument.
NUnit.Framework.TestCaseData.TestCaseData ( object  arg1,
object  arg2,
object  arg3 
)
inline

Initializes a new instance of the TestCaseData class.

Parameters
arg1The first argument.
arg2The second argument.
arg3The third argument.

Member Function Documentation

TestCaseData NUnit.Framework.TestCaseData.Returns ( object  result)
inline

Sets the expected result for the test

Parameters
resultThe expected result
Returns
A modified TestCaseData
TestCaseData NUnit.Framework.TestCaseData.SetName ( string  name)
inline

Sets the name of the test case

Returns
The modified TestCaseData instance

Referenced by NUnit.Framework.Attributes.RandomAttributeTests.MethodNames.GetEnumerator().

TestCaseData NUnit.Framework.TestCaseData.SetDescription ( string  description)
inline

Sets the description for the test case being constructed.

Parameters
descriptionThe description.
Returns
The modified TestCaseData instance.

References NUnit.Framework.Internal.PropertyNames.Description.

TestCaseData NUnit.Framework.TestCaseData.SetCategory ( string  category)
inline

Applies a category to the test

Parameters
category
Returns

References NUnit.Framework.Internal.PropertyNames.Category.

TestCaseData NUnit.Framework.TestCaseData.SetProperty ( string  propName,
string  propValue 
)
inline

Applies a named property to the test

Parameters
propName
propValue
Returns
TestCaseData NUnit.Framework.TestCaseData.SetProperty ( string  propName,
int  propValue 
)
inline

Applies a named property to the test

Parameters
propName
propValue
Returns
TestCaseData NUnit.Framework.TestCaseData.SetProperty ( string  propName,
double  propValue 
)
inline

Applies a named property to the test

Parameters
propName
propValue
Returns
TestCaseData NUnit.Framework.TestCaseData.Explicit ( )
inline

Marks the test case as explicit.

References NUnit.Framework.TestCaseData.Explicit().

Referenced by NUnit.Framework.TestCaseData.Explicit().

TestCaseData NUnit.Framework.TestCaseData.Explicit ( string  reason)
inline

Marks the test case as explicit, specifying the reason.

References NUnit.Framework.TestCaseData.Explicit(), and NUnit.Framework.Internal.PropertyNames.SkipReason.

TestCaseData NUnit.Framework.TestCaseData.Ignore ( string  reason)
inline

Ignores this TestCase, specifying the reason.

Parameters
reasonThe reason.
Returns

References NUnit.Framework.Internal.PropertyNames.SkipReason.


The documentation for this class was generated from the following file: