IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
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. More...
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... | |
![]() | |
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() |
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.
[TestFixture] public class Fixture { [Test] public void MethodToTest() {}
[Test(Description = "more detailed description")] public void TestDescriptionMethod() {} }
|
inline |
Modifies a test by adding a description, if not already set.
test | The test to modify |
Implements NUnit.Framework.Interfaces.IApplyToTest.
References NUnit.Framework.Internal.PropertyNames.Author, NUnit.Framework.Interfaces.IPropertyBag.ContainsKey(), NUnit.Framework.Internal.PropertyNames.Description, NUnit.Framework.Internal.Test.Properties, NUnit.Framework.Interfaces.IPropertyBag.Set(), and NUnit.Framework.Internal.PropertyNames.TestOf.
|
inline |
Construct a TestMethod from a given method.
method | The method for which a test is to be constructed. |
suite | The suite to which the test will be added. |
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().
|
private |
|
private |
|
getset |
Descriptive text for this test
|
getset |
The author of this test
|
getset |
The type that this test is testing
|
getset |
Gets or sets the expected result.
The result.
|
getprivate set |
Returns true if an expected result has been set