<PackageReference Include="NUnit" Version="3.11.0" />

NUnit.Framework

Namespace with 80 public types

Classes

 AssertionException Thrown when an assertion failed.
 AssertionHelper AssertionHelper is an optional base class for user tests, allowing the use of shorter names in making asserts.
 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.
 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.
 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.
 InconclusiveException Thrown when a test executes inconclusively.
 LevelOfParallelismAttribute Sets the number of worker threads that may be allocated by the framework for running tests.
 List The List class is a helper class with properties and methods that supply a number of constraints used with lists and collections.
 ListMapper ListMapper is used to transform a collection used as an actual argument producing another collection to be used in the assertion.
 MaxTimeAttribute Specifies the maximum time (in milliseconds) for a test case to succeed.
 MultipleAssertException Thrown when an assertion failed.
 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.
 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.
 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.
 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.
 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.
 Warn Provides static methods to express conditions that must be met for the test to succeed. If any test fails, a warning is issued.

Enumerations

 ActionTargets The different targets a test action attribute can be applied to
 ParallelScope Specifies the degree to which a test, and its descendants, may be run in parallel.

Static Classes

 DirectoryAssert Asserts on Directories
 FileAssert Asserts on Files

Abstract Classes

 Assert The Assert class contains a collection of static methods that implement the most common assertions used in NUnit.
 CollectionAssert A set of Assert methods operating on one or more collections
 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.
 DataAttribute Abstract base class for all data-providing attributes defined by NUnit. Used to select all data sources for a method, class or parameter.
 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.
 StringAssert Basic Asserts on strings.
 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.

Interfaces

 ITestAction When implemented by an attribute, this interface implemented to provide actions to execute before and after tests.