iOS Guides | Samples

NUnit.Framework.TestAttribute Class

Adding this attribute to a method within a class makes the method callable from the NUnit test runner. There is a property called Description which is optional which you can provide a more detailed test description. This class cannot be inherited.

See Also: TestAttribute

Syntax

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class TestAttribute : NUnitAttribute, IApplyToTest

Example

[TestFixture] public class Fixture { [Test] public void MethodToTest() {} [Test(Description = "more detailed description")] publc void TestDescriptionMethod() {} }

Requirements

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

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

See Also: NUnitAttribute

Public Constructors

Public Properties

DescriptionString. Descriptive text for this test

Public Methods