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.TestCaseAttribute Class Reference

TestCaseAttribute is used to mark parameterized test cases and provide them with their arguments. More...

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

Public Member Functions

 TestCaseAttribute (params object[] arguments)
 Construct a TestCaseAttribute with a list of arguments. This constructor is not CLS-Compliant More...
 
 TestCaseAttribute (object arg)
 Construct a TestCaseAttribute with a single argument More...
 
 TestCaseAttribute (object arg1, object arg2)
 Construct a TestCaseAttribute with a two arguments More...
 
 TestCaseAttribute (object arg1, object arg2, object arg3)
 Construct a TestCaseAttribute with a three arguments More...
 
IEnumerable< TestMethodBuildFrom (IMethodInfo method, Test suite)
 Construct one or more TestMethods from a given MethodInfo, using available parameter data. More...
 
- Public Member Functions inherited from NUnit.Framework.NUnitAttribute
 NUnitAttribute ()
 Default constructor More...
 

Properties

string TestName [get, set]
 Gets or sets the name of the test. More...
 
RunState RunState [get, private set]
 Gets or sets the RunState of this test case. More...
 
object[] Arguments [get, private set]
 Gets the list of arguments to a test case More...
 
IPropertyBag Properties [get, private set]
 Gets the properties of the test case More...
 
object ExpectedResult [get, set]
 Gets or sets the expected result. More...
 
bool HasExpectedResult [get, private set]
 Returns true if the expected result has been set More...
 
string Description [get, set]
 Gets or sets the description. More...
 
string Author [get, set]
 The author of this test More...
 
Type TestOf [get, set]
 The type that this test is testing More...
 
string Ignore [get, set]
 Gets or sets the reason for ignoring the test More...
 
bool Explicit [get, set]
 Gets or sets a value indicating whether this NUnit.Framework.TestCaseAttribute is explicit. More...
 
string Reason [get, set]
 Gets or sets the reason for not running the test. More...
 
string IgnoreReason [get, set]
 Gets or sets the ignore reason. When set to a non-null non-empty value, the test is marked as ignored. More...
 
string IncludePlatform [get, set]
 Comma-delimited list of platforms to run the test for More...
 
string ExcludePlatform [get, set]
 Comma-delimited list of platforms to not run the test for More...
 
string Category [get, set]
 Gets and sets the category for this test case. May be a comma-separated list of categories. 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...
 
- 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...
 

Private Member Functions

TestCaseParameters GetParametersForTestCase (IMethodInfo method)
 

Static Private Member Functions

static void PerformSpecialConversions (object[] arglist, IParameterInfo[] parameters)
 Performs several special conversions allowed by NUnit in order to permit arguments with types that cannot be used in the constructor of an Attribute such as TestCaseAttribute or to simplify their use. More...
 

Private Attributes

object _expectedResult
 
Type _testOf
 

Detailed Description

TestCaseAttribute is used to mark parameterized test cases and provide them with their arguments.

Constructor & Destructor Documentation

NUnit.Framework.TestCaseAttribute.TestCaseAttribute ( params object[]  arguments)
inline

Construct a TestCaseAttribute with a list of arguments. This constructor is not CLS-Compliant

Parameters
arguments
NUnit.Framework.TestCaseAttribute.TestCaseAttribute ( object  arg)
inline

Construct a TestCaseAttribute with a single argument

Parameters
arg
NUnit.Framework.TestCaseAttribute.TestCaseAttribute ( object  arg1,
object  arg2 
)
inline

Construct a TestCaseAttribute with a two arguments

Parameters
arg1
arg2
NUnit.Framework.TestCaseAttribute.TestCaseAttribute ( object  arg1,
object  arg2,
object  arg3 
)
inline

Construct a TestCaseAttribute with a three arguments

Parameters
arg1
arg2
arg3

Member Function Documentation

static void NUnit.Framework.TestCaseAttribute.PerformSpecialConversions ( object[]  arglist,
IParameterInfo[]  parameters 
)
inlinestaticprivate

Performs several special conversions allowed by NUnit in order to permit arguments with types that cannot be used in the constructor of an Attribute such as TestCaseAttribute or to simplify their use.

Parameters
arglistThe arguments to be converted
parametersThe ParameterInfo array for the method

References NUnit.Framework.Interfaces.IParameterInfo.ParameterType.

Member Data Documentation

object NUnit.Framework.TestCaseAttribute._expectedResult
private
Type NUnit.Framework.TestCaseAttribute._testOf
private

Property Documentation

string NUnit.Framework.TestCaseAttribute.TestName
getset

Gets or sets the name of the test.

The name of the test.

RunState NUnit.Framework.TestCaseAttribute.RunState
getprivate set

Gets or sets the RunState of this test case.

object [] NUnit.Framework.TestCaseAttribute.Arguments
getprivate set

Gets the list of arguments to a test case

IPropertyBag NUnit.Framework.TestCaseAttribute.Properties
getprivate set

Gets the properties of the test case

object NUnit.Framework.TestCaseAttribute.ExpectedResult
getset

Gets or sets the expected result.

The result.

bool NUnit.Framework.TestCaseAttribute.HasExpectedResult
getprivate set

Returns true if the expected result has been set

string NUnit.Framework.TestCaseAttribute.Description
getset

Gets or sets the description.

The description.

string NUnit.Framework.TestCaseAttribute.Author
getset

The author of this test

Type NUnit.Framework.TestCaseAttribute.TestOf
getset

The type that this test is testing

string NUnit.Framework.TestCaseAttribute.Ignore
getset

Gets or sets the reason for ignoring the test

bool NUnit.Framework.TestCaseAttribute.Explicit
getset

Gets or sets a value indicating whether this NUnit.Framework.TestCaseAttribute is explicit.

true if explicit; otherwise, false.

string NUnit.Framework.TestCaseAttribute.Reason
getset

Gets or sets the reason for not running the test.

The reason.

string NUnit.Framework.TestCaseAttribute.IgnoreReason
getset

Gets or sets the ignore reason. When set to a non-null non-empty value, the test is marked as ignored.

The ignore reason.

string NUnit.Framework.TestCaseAttribute.IncludePlatform
getset

Comma-delimited list of platforms to run the test for

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

string NUnit.Framework.TestCaseAttribute.ExcludePlatform
getset

Comma-delimited list of platforms to not run the test for

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

string NUnit.Framework.TestCaseAttribute.Category
getset

Gets and sets the category for this test case. May be a comma-separated list of categories.


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