NUnit.Framework
Namespace with 91 public types
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.
AssertionException
Thrown when an assertion failed.
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.
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.
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 . Synonymous with .
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 . Synonymous with .
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.
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
IgnoreAttribute
Marks an assembly, test fixture or test method as being ignored. Ignored tests result in a warning message when the tests are run.
IgnoredTestCaseData
The IgnoredTestCaseData class represents a ignored TestCaseData. It adds
the ability to set a date until which the test will be ignored.
IgnoreException
Thrown when an assertion failed.
InconclusiveException
Thrown when a test executes inconclusively.
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.
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.
NonTestAssemblyAttribute
Used by third-party frameworks, or other software, that reference
the NUnit framework but do not contain any tests. Applying the
attribute indicates that the assembly is not a test assembly and
may prevent errors if certain runners attempt to load the assembly.
Note that recognition of the attribute depends on each individual runner.
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.
RequiresThreadAttribute
Marks a test that must run on a separate thread.
RetryAttribute
Specifies that a test method should be rerun on failure up to the specified
maximum number of times.
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 or
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
is set forcing all child tests
to be run sequentially on the current thread.
Any 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.
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`1
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute`2
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute`3
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute`4
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseAttribute`5
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`1
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData`2
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData`3
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData`4
Marks a method as a parameterized test suite and provides arguments for each test case.
TestCaseData`5
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.
The name parameter is a representing the name of the source used to provide test cases. It has the following characteristics:It must be a static field, property, or method in the same class as the test case.It must return an or a type that implements , such as an array, a List, or your own iterator.Each item returned by the enumerator must be compatible with the signature of the method on which the attribute appears.
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.
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
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.
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.
ValuesAttribute
Provides literal arguments for an individual parameter of a test.
ValueSourceAttribute
Indicates the source used to provide data for one parameter of a test method.
Structures
NUnitString
A class to allow postponing the actual formatting of interpolated strings.
Enumerations
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.
Abstract Classes
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
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.
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.
Does
Helper class with properties and methods that supply
a number of constraints used in Asserts.
Has
Helper class with properties and methods that supply
a number of constraints used in Asserts.
IncludeExcludeAttribute
Abstract base for attributes that are used to include tests in
the test run based on environmental settings.
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.
NUnitAttribute
Abstract base class for all custom attributes defined by NUnit.
ResultStateException
Abstract base for Exceptions that terminate a test and provide a ResultState.
TestActionAttribute
Abstract attribute providing actions to execute before and after tests.
Throws
Helper class with properties and methods that supply
constraints that operate on exceptions.
Warn
Provides static methods to express conditions
that must be met for the test to succeed. If
any test fails, a warning is issued.
Interfaces
ITestAction
When implemented by an attribute, this interface implemented to provide actions to execute before and after tests.