iOS Guides | Samples

NUnit.Framework.TestCaseAttribute Class

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

See Also: TestCaseAttribute

Syntax

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

Requirements

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

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

[read-only]
ArgumentsObject[]. Gets the list of arguments to a test case
[read-only]
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.
[read-only]
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.
[read-only]
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
[read-only]
PropertiesXamarin.iOS.dll=NUnit.Framework.Api.IPropertyBag. NYI
ReasonString. Gets or sets the reason for not running the test.
ResultObject.
[read-only]
RunStateXamarin.iOS.dll=NUnit.Framework.Api.RunState. Gets the RunState of this test case.
TestNameString. Gets or sets the name of the test.