iOS Guides | Samples

NUnit.Framework.TestCaseAttribute Class

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

See Also: TestCaseAttribute


[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public class TestCaseAttribute : DataAttribute, ITestCaseData, ITestCaseSource


Namespace: NUnit.Framework
Assembly: NUnitLite (in NUnitLite.dll)
Assembly Versions:

The members of NUnit.Framework.TestCaseAttribute are listed below.

See Also: DataAttribute

Public Constructors

Construct a TestCaseAttribute with a single argument
Construct a TestCaseAttribute with a list of arguments. This constructor is not CLS-Compliant
Construct a TestCaseAttribute with a two arguments
Construct a TestCaseAttribute with a three arguments

Public Properties

ArgumentsObject[]. Gets the list of arguments to a test case
CategoriesIList. Gets a list of categories for this fixture
CategoryString. Gets and sets the category for this fixture. May be a comma-separated list of categories.
DescriptionString. Gets or sets the description.
ExceptionDataXamarin.iOS.dll=NUnit.Framework.Api.ExpectedExceptionData. Gets data about any expected exception for this test case.
ExpectedExceptionType. Gets or sets the expected exception.
ExpectedExceptionNameString. Gets or sets the name the expected exception.
ExpectedMessageString. Gets or sets the expected message of the expected exception
ExpectedResultObject. Gets or sets the expected result.
ExplicitBoolean. Gets or sets a value indicating whether this TestCaseAttribute is explicit.
HasExpectedResultBoolean. Returns true if the expected result has been set
IgnoreBoolean. Gets or sets the ignored status of the test
IgnoreReasonString. Gets or sets the ignore reason. When set to a non-null non-empty value, the test is marked as ignored.
MatchTypeXamarin.iOS.dll=NUnit.Framework.MessageMatch. Gets or sets the type of match to be performed on the expected message
PropertiesXamarin.iOS.dll=NUnit.Framework.Api.IPropertyBag. NYI
ReasonString. Gets or sets the reason for not running the test.
RunStateXamarin.iOS.dll=NUnit.Framework.Api.RunState. Gets the RunState of this test case.
TestNameString. Gets or sets the name of the test.