Namespace NUnit.Framework
Classes
ApartmentAttribute
Marks a test as needing to be run in a particular threading apartment state. This will cause it to run in a separate thread if necessary.
Assert
The Assert class contains a collection of static methods that implement the most common assertions used in NUnit.
AssertBase
Base class for different Assert, containing helper functions
AssertionException
Thrown when an assertion failed.
Assume
Provides static methods to express the assumptions that must be met for a test to give a meaningful result. If an assumption is not met, the test should produce an inconclusive result.
AuthorAttribute
Provides the author of a test or test fixture.
CancelAfterAttribute
Applies a timeout in milliseconds to a test. When applied to a method, the test's cancellation token is cancelled if the timeout is exceeded.
CategoryAttribute
Applies a category to a test
CombinatorialAttribute
Marks a test to use a combinatorial join of any argument data provided. Since this is the default, the attribute is optional.
CombiningStrategyAttribute
Marks a test as using a particular CombiningStrategy to join any supplied parameter data. Since this is the default, the attribute is optional.
Contains
Helper class with properties and methods that supply a number of constraints used in Asserts.
CultureAttribute
Marks an assembly, test fixture or test method as applying to a specific Culture.
DatapointAttribute
Marks a field for use as a datapoint when executing a theory within the same fixture that requires an argument of the field's Type.
DatapointSourceAttribute
Marks a field, property or method as providing a set of datapoints for use in executing any theories within the same fixture that require an argument of the provided type. The data source may provide an array of the required Type or an IEnumerable<T>. Synonymous with DatapointsAttribute.
DatapointsAttribute
Marks a field, property or method as providing a set of datapoints for use in executing any theories within the same fixture that require an argument of the provided Type. The data source may provide an array of the required Type or an IEnumerable<T>. Synonymous with DatapointSourceAttribute.
DefaultFloatingPointToleranceAttribute
Sets the tolerance used by default when checking the equality of floating point values within the test assembly, fixture or method.
DescriptionAttribute
Provides the descriptive text relating to the assembly, test fixture or test method.
Does
Helper class with properties and methods that supply a number of constraints used in Asserts.
ExplicitAttribute
Marks an assembly, test fixture or test method such that it will only run if explicitly executed from the GUI, command line or included within a test filter. The test will not be run simply because an enclosing suite is run.
FixtureLifeCycleAttribute
Specify the life cycle of a Fixture
Has
Helper class with properties and methods that supply a number of constraints used in Asserts.
IgnoreAttribute
Marks an assembly, test fixture or test method as being ignored. Ignored tests result in a warning message when the tests are run.
IgnoreException
Thrown when an assertion failed.
IncludeExcludeAttribute
Abstract base for attributes that are used to include tests in the test run based on environmental settings.
InconclusiveException
Thrown when a test executes inconclusively.
Is
Helper class with properties and methods that supply a number of constraints used in Asserts.
Iz
The Iz class is a synonym for Is intended for use in VB, which regards Is as a keyword.
LevelOfParallelismAttribute
Sets the number of worker threads that may be allocated by the framework for running tests.
MaxTimeAttribute
Specifies the maximum time (in milliseconds) for a test case to succeed.
MultipleAssertException
Thrown when an assertion failed.
NUnitAttribute
Abstract base class for all custom attributes defined by NUnit.
NetPlatformAttribute
Marks an assembly, test fixture or test method as applying to a specific platform.
NonParallelizableAttribute
Marks tests that should NOT be run in parallel.
OneTimeSetUpAttribute
Identifies a method that is called once to perform setup before any child tests are run.
OneTimeTearDownAttribute
Identifies a method to be called once after all the child tests have run. The method is guaranteed to be called, even if an exception is thrown.
OrderAttribute
Defines the order that the test will run in
PairwiseAttribute
Marks a test as using a pairwise join of any supplied argument data. Arguments will be combined in such a way that all possible pairs of arguments are used.
ParallelizableAttribute
Marks a test assembly, fixture or method that may be run in parallel.
PlatformAttribute
Marks an assembly, test fixture or test method as applying to a specific platform.
PropertyAttribute
Attaches information to a test assembly, fixture or method as a name/value pair.
RandomAttribute
Supplies a set of random values to a single parameter of a parameterized test.
RangeAttribute
Supplies a range of values to an individual parameter of a parameterized test.
RepeatAttribute
Specifies that a test should be run multiple times.
RepeatAttribute.RepeatedTestCommand
The test command for the RepeatAttribute
RequiresThreadAttribute
Marks a test that must run on a separate thread.
ResultStateException
Abstract base for Exceptions that terminate a test and provide a ResultState.
RetryAttribute
Specifies that a test method should be rerun on failure up to the specified maximum number of times.
RetryAttribute.RetryCommand
The test command for the RetryAttribute
SequentialAttribute
Marks a test to use a sequential join of any provided argument data. Arguments will be combined into test cases, taking the next value of each argument until all are used.
SetCultureAttribute
Sets the current Culture on an assembly, test fixture or test method for the duration of a test. The culture remains set until the test or fixture completes and is then reset to its original value.
SetUICultureAttribute
Sets the current UI Culture on an assembly, test fixture or test method for the duration of a test. The UI culture remains set until the test or fixture completes and is then reset to its original value.
SetUpAttribute
Identifies a method to be called immediately before each test is run.
SetUpFixtureAttribute
Identifies a class as containing OneTimeSetUpAttribute or OneTimeTearDownAttribute methods for all the test fixtures under a given namespace.
SingleThreadedAttribute
Marks a test fixture as requiring all child tests to be run on the same thread as the OneTimeSetUp and OneTimeTearDown. A flag in the TestExecutionContext is set forcing all child tests to be run sequentially on the current thread. Any ParallelScope setting is ignored.
SuccessException
Thrown when an assertion failed.
TearDownAttribute
Identifies a method to be called immediately after each test is run. The method is guaranteed to be called, even if an exception is thrown.
TestActionAttribute
Abstract attribute providing actions to execute before and after tests.
TestAssemblyDirectoryResolveAttribute
Marks a test assembly as needing a special assembly resolution hook that will explicitly search the test assembly's directory for dependent assemblies. This works around a conflict between mixed-mode assembly initialization and tests running in their own AppDomain in some cases.
TestAttribute
Marks the method as callable from the NUnit test runner.
TestCaseAttribute
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute<T>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute<T1, T2>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute<T1, T2, T3>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute<T1, T2, T3, T4>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute<T1, T2, T3, T4, T5>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData
The TestCaseData class represents a set of arguments and other parameter info to be used for a parameterized test case. It is derived from TestCaseParameters and adds a fluent syntax for use in initializing the test case.
TestCaseData<T>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData<T1, T2>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData<T1, T2, T3>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData<T1, T2, T3, T4>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData<T1, T2, T3, T4, T5>
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseSourceAttribute
Indicates the source to be used to provide test fixture instances for a test class.
TestContext
Provide the context information of the current test. This is an adapter for the internal ExecutionContext class, hiding the internals from the user test.
TestContext.PropertyBagAdapter
TestContext.PropertyBagAdapter adapts an IPropertyBag for consumption by the user.
TestContext.PropertyHierachyItem
Represents properties at different test levels
TestContext.PropertyValueHierarchyItem
Represents property value at different test levels
TestContext.ResultAdapter
ResultAdapter adapts a TestResult for consumption by the user test code.
TestContext.TestAdapter
TestAdapter adapts a Test for consumption by the user test code.
TestFixtureAttribute
Marks the class as a TestFixture.
TestFixtureData
The TestFixtureData class represents a set of arguments and other parameter info to be used for a parameterized fixture. It is derived from TestFixtureParameters and adds a fluent syntax for use in initializing the fixture.
TestFixtureSourceAttribute
Identifies the source used to provide test fixture instances for a test class.
TestOfAttribute
Indicates the method or class the assembly, test fixture or test method is testing.
TestParameters
TestParameters class holds any named parameters supplied to the test run
TheoryAttribute
Adding this attribute to a method within a 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.
Throws
Helper class with properties and methods that supply constraints that operate on exceptions.
TimeoutAttribute
Applies a timeout in milliseconds to a test. When applied to a method, the test is cancelled if the timeout is exceeded. When applied to a class or assembly, the default timeout is set for all contained test methods.
ValueSourceAttribute
Indicates the source used to provide data for one parameter of a test method.
ValuesAttribute
Provides literal arguments for an individual parameter of a test.
Warn
Provides static methods to express conditions that must be met for the test to succeed. If any test fails, a warning is issued.
Structs
NUnitString
A class to allow postponing the actual formatting of interpolated strings.
Interfaces
ITestAction
When implemented by an attribute, this interface implemented to provide actions to execute before and after tests.
Enums
ActionTargets
The different targets a test action attribute can be applied to
LifeCycle
Specifies the life cycle for a test fixture.
ParallelScope
Specifies the degree to which a test, and its descendants, may be run in parallel.
Delegates
AsyncTestDelegate
Delegate used by tests that execute async code and capture any thrown exception.
TestDelegate
Delegate used by tests that execute code and capture any thrown exception.