Game Development Reference
In-Depth Information
[Explicit]
If a test or a test fixture is marked with the [Explicit] attribute, the only way it will
run is when it has been explicitly selected in the GUI to run, or passed to the com-
mand line version.
The following code snippet shows how to use this attribute:
[TestFixture]
public class SimpleClassTests
{
[Test, Explicit]
public void ExplicitTest()
{
}
}
[TestFixture, Explicit]
public class ExplicitTests
{
}
Note
If NUnit encounters an explicit test, it will treat the test as if it were marked with the [Ignore]
attribute.
[Category]
There may be times when you want to categorize or group related tests, especially
when working with a project of reasonable size. The [Category] attribute can be
used to specify a category name for a test or test fixture to group it with other tests
or test fixtures sporting the same category name.
When a specific category is selected to run, only tests or test fixtures belonging to
the selected category are run.
The following code snippet shows how to use this attribute:
[TestFixture]
public class SimpleClassTests
{
[Test, Category(‚ÄúProcessorIntensive‚ÄĚ)]
public void TestLongRunningProcess()
{
}
 
Search Nedrilad ::




Custom Search