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

Adding this attribute to a method within a

See also
TestFixtureAttribute

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. More...

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

Public Member Functions

void ApplyToTest (Test test)
 Modifies a test by adding a description, if not already set. More...
 
TestMethod BuildFrom (IMethodInfo method, Test suite)
 Construct a TestMethod from a given method. More...
 
- Public Member Functions inherited from NUnit.Framework.NUnitAttribute
 NUnitAttribute ()
 Default constructor More...
 

Properties

string Description [get, set]
 Descriptive text for this test More...
 
string Author [get, set]
 The author of this test More...
 
Type TestOf [get, set]
 The type that this test is testing More...
 
object ExpectedResult [get, set]
 Gets or sets the expected result. More...
 
bool HasExpectedResult [get, private set]
 Returns true if an expected result has been set More...
 

Private Attributes

object _expectedResult
 
readonly NUnitTestCaseBuilder _builder = new NUnitTestCaseBuilder()
 

Detailed Description

Adding this attribute to a method within a

See also
TestFixtureAttribute

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.

[TestFixture] public class Fixture { [Test] public void MethodToTest() {}

[Test(Description = "more detailed description")] public void TestDescriptionMethod() {} }

Member Function Documentation

TestMethod NUnit.Framework.TestAttribute.BuildFrom ( IMethodInfo  method,
Test  suite 
)
inline

Construct a TestMethod from a given method.

Parameters
methodThe method for which a test is to be constructed.
suiteThe suite to which the test will be added.
Returns
A TestMethod

Implements NUnit.Framework.Interfaces.ISimpleTestBuilder.

References NUnit.Framework.Internal.TestCaseParameters.ExpectedResult.

Referenced by NUnit.Framework.Attributes.TestMethodBuilderTests.TestAttribute_NoArgs_Runnable(), and NUnit.Framework.Attributes.TestMethodBuilderTests.TestAttribute_WithArgs_NotRunnable().

Member Data Documentation

object NUnit.Framework.TestAttribute._expectedResult
private
readonly NUnitTestCaseBuilder NUnit.Framework.TestAttribute._builder = new NUnitTestCaseBuilder()
private

Property Documentation

string NUnit.Framework.TestAttribute.Description
getset

Descriptive text for this test

string NUnit.Framework.TestAttribute.Author
getset

The author of this test

Type NUnit.Framework.TestAttribute.TestOf
getset

The type that this test is testing

object NUnit.Framework.TestAttribute.ExpectedResult
getset

Gets or sets the expected result.

The result.

bool NUnit.Framework.TestAttribute.HasExpectedResult
getprivate set

Returns true if an expected result has been set


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