nunit.core.interfaces
The TestRunner Interface allows client code, such as the NUnit console and
gui runners, to load and run tests. This is the lowest level interface generally
supported for running tests and is implemented by the RemoteTestRunner class in
the NUnit core as well as by other classes running on the client side.
The Load method is used to load a suite of tests from one or more
assemblies, returning a tree of TestNodes to the caller.
The CountTestCases family of methods returns the number of test cases in the
loaded suite, either in its entirety or by using a filter to count a subset of tests.
The Run family of methods performs a test run synchronously, returning a TestResult
or TestResult[] to the caller. If provided, an EventListener interface will be
notified of significant events in the running of the tests. A filter may be used
to run a subset of the tests.
BeginRun and EndRun provide a simplified form of the asynchronous invocation
pattern used in many places within the .NET framework. Because the current
implementation allows only one run to be in process at a time, an IAsyncResult
is not used at this time.
Methods to cancel a run and to wait for a run to complete are also provided. The
result of the last run may be obtained by querying the TestResult property.
Load the assemblies in a test package
The test package to be loaded
True if the tests were loaded successfully, otherwise false
Unload all tests previously loaded
Count Test Cases using a filter
The filter to apply
The number of test cases found
Run selected tests and return a test result. The test is run synchronously,
and the listener interface is notified as it progresses. Arguments control whether
trace and log output are passed back to the caller.
Interface to receive EventListener notifications.
The filter to apply when running the tests
If true, trace output is returned as a TestOutput event
The threshold for log output to be returned as a TestOutput event
Start a run of selected tests. The tests are run aynchronously and the
listener interface is notified as it progresses. Arguments control whether
trace and log output are passed back to the caller.
Interface to receive EventListener notifications.
The filter to apply when running the tests
If true, trace output is returned as a TestOutput event
The threshold for log output to be returned as a TestOutput event
Wait for an asynchronous run to complete and return the result.
A TestResult for the entire run
Cancel the test run that is in progress. For a synchronous run,
a client wanting to call this must create a separate run thread.
Wait for the test run in progress to complete. For a synchronous run,
a client wanting to call this must create a separate run thread. In
particular, a gui client calling this method is likely to hang, since
events will not be able to invoke methods on the gui thread.
TestRunners are identified by an ID. So long as there
is only one test runner or a single chain of test runners,
the default id of 0 may be used. However, any client that
creates multiple runners must ensure that each one has a
unique ID in order to locate and run specific tests.
Running indicates whether a test is in progress. To retrieve the
results from an asynchronous test run, wait till Running is false.
Returns information about loaded assemblies
The loaded test, converted to a tree of TestNodes so they can be
serialized and marshalled to a remote client.
Result of the last test run.
TestName encapsulates all info needed to identify and
locate a test that has been loaded by a runner. It consists
of a three components: the simple name of the test, an int
id that is unique to a given tree of tests and an int
runner id that identifies the particular runner that
holds the test instance.
ID that uniquely identifies the test
The simple name of the test, without qualification
The fully qualified name of the test
Parse a string representation of a TestName,
returning a TestName.
The string to parse
A TestName
Compares two TestNames for equality
the other TestID
True if the two TestIDs are equal
Calculates a hashcode for this TestID
The hash code.
Override ToString() to display the UniqueName
Override the == operator
Override the != operator
Returns a duplicate of this TestName
Gets or sets the TestID that uniquely identifies this test
Gets the ID for the runner that created the test from
the TestID, or returns -1 if the TestID is null.
Gets or sets the simple name of the test
Gets or sets the full (qualified) name of the test
Get the string representation of this test name, incorporating all
the components of the name.
The ITestCaseBuilder interface is exposed by a class that knows how to
build a test case from certain methods.
Examine the method and determine if it is suitable for
this builder to use in building a TestCase.
Note that returning false will cause the method to be ignored
in loading the tests. If it is desired to load the method
but label it as non-runnable, ignored, etc., then this
method must return true.
The test method to examine
True is the builder can use this method
Build a TestCase from the provided MethodInfo.
The method to be used as a test case
A TestCase or null
ITestCaseBuilder2 extends ITestCaseBuilder with methods
that include the suite for which the test case is being
built. Test case builders not needing the suite can
continue to implement ITestCaseBuilder.
Examine the method and determine if it is suitable for
this builder to use in building a TestCase to be
included in the suite being populated.
Note that returning false will cause the method to be ignored
in loading the tests. If it is desired to load the method
but label it as non-runnable, ignored, etc., then this
method must return true.
The test method to examine
The suite being populated
True is the builder can use this method
Build a TestCase from the provided MethodInfo for
inclusion in the suite being constructed.
The method to be used as a test case
The test suite being populated, or null
A TestCase or null
The Addin class holds information about an addin.
Construct an Addin for a type.
The type to be used
Return true if two Addins have teh same type name
The other addin to be compared
Return a hash code for this addin
The name of the Addin
Brief description of what the Addin does
The type or types of extension provided, using
one or more members of the ExtensionType enumeration.
The AssemblyQualifiedName of the type that implements
the addin.
The status of the addin
Any message that clarifies the status of the Addin,
such as an error message or an explanation of why
the addin is disabled.
TestInfo holds common info about a test. It represents only
a single test or a suite and contains no references to other
tests. Since it is informational only, it can easily be passed
around using .Net remoting.
TestInfo is used directly in all EventListener events and in
TestResults. It contains an ID, which can be used by a
runner to locate the actual test.
TestInfo also serves as the base class for TestNode, which
adds hierarchical information and is used in client code to
maintain a visible image of the structure of the tests.
Common interface supported by all representations
of a test. Only includes informational fields.
The Run method is specifically excluded to allow
for data-only representations of a test.
Count the test cases that pass a filter. The
result should match those that would execute
when passing the same filter to Run.
The filter to apply
The count of test cases
Gets the completely specified name of the test
encapsulated in a TestName object.
Gets a string representing the type of test, e.g.: "Test Case"
Indicates whether the test can be run using
the RunState enum.
Reason for not running the test, if applicable
Count of the test cases ( 1 if this is a test case )
Categories available for this test
Return the description field.
Return additional properties of the test
True if this is a suite
Gets the parent test of this test
For a test suite, the child tests or suites
Null if this is not a test suite
TestName that identifies this test
Reason for not running the test
Number of test cases in this test or suite
True if this is a suite
The test description
A list of all the categories assigned to a test
A dictionary of properties, used to add information
to tests without requiring the class to change.
Construct from an ITest
Test from which a TestNode is to be constructed
Construct as a parent to multiple tests.
The name to use for the new test
An array of child tests
Construct given a test name
The TestName for the new test
Counts the test cases that would be run if this
test were executed using the provided filter.
The filter to apply
A count of test cases
Gets the completely specified name of the test
encapsulated in a TestName object.
Gets a string representing the kind of test this
object represents for display purposes.
The test description
Gets the RunState for this test
The reason for ignoring a test
Count of test cases in this test.
Gets the parent test of this test
Gets a list of the categories applied to this test
Gets a list of any child tests
True if this is a suite, false if a test case
Gets the Properties dictionary for this test
Test Class.
TestName that identifies this test
Indicates whether the test should be executed
Test suite containing this test, or null
A dictionary of properties, used to add information
to tests without requiring the class to change.
Get the current apartment state of the test
Constructs a test given its name
The name of the test
Constructs a test given the path through the
test hierarchy to its parent and a name.
The parent tests full name
The name of the test
Constructs a test given a TestName object
The TestName for this test
Sets the runner id of a test and optionally its children
The runner id to be used
True if all children should get the same id
Gets a count of test cases that would be run using
the specified filter.
Runs the test under a particular filter, sending
notifications to a listener.
An event listener to receive notifications
A filter used in running the test
Compares this test to another test for sorting purposes
The other test
Value of -1, 0 or +1 depending on whether the current test is less than, equal to or greater than the other test
Return true if the test requires a thread
Get the desired apartment state for running the test
Gets a boolean value indicating whether this
test should run on it's own thread.
Gets the TestName of the test
Gets a string representing the kind of test
that this object represents, for use in display.
Whether or not the test should be run
Reason for not running the test, if applicable
Gets a count of test cases represented by
or contained under this test.
Gets a list of categories associated with this test.
Gets a description associated with this test.
Gets the property dictionary for this test
Indicates whether this test is a suite
Gets the parent test of this test
Gets the parent as a Test object.
Used by the core to set the parent.
Gets this test's child tests
Gets the Type of the fixture used in running this test
Gets or sets a fixture object for running this test
The PropertyNames struct lists common property names, which are
accessed by reflection in the NUnit core. This provides a modicum
of type safety as opposed to using the strings directly.
Exception Type expected from a test
Exception Type expected from a test (pre-2.5)
FullName of the Exception Type expected from a test
FullName of the Exception Type expected from a test (pre-2.5)
ExpectedException Message
ExpectedException MatchType
Expected return result from test
Indicates whether there is an expected return result
Description of the test
Alternate test name
Arguments for the test
Indicates test case is ignored
Indicates test case is explicit
The reason a test case is ignored
Properties of the test
Categories of the test
Name of a category
Reason for not running a test
Flag indicating excluded test should be marked as Ignored
Name of an addin that must be present to run a test
The ResultState enum indicates the result of running a test
The result is inconclusive
The test was not runnable.
The test has been skipped.
The test has been ignored.
The test succeeded
The test failed
The test encountered an unexpected exception
The test was cancelled by the user
The FailureSite enum indicates the stage of a test
in which an error or failure occured.
Failure in the test itself
Failure in the SetUp method
Failure in the TearDown method
Failure of a parent test
Failure of a child test
The IService interface is implemented by all Services.
Initialize the Service
Do any cleanup needed before terminating the service
DecoratorPriority wraps constants that may be used
to represent the relative priority of TestDecorators.
Decorators with a lower priority are applied first
so that higher priority decorators wrap them.
NOTE: This feature is subject to change.
The default priority, equivalent to Normal
Priority for Decorators that must apply first
Normal Decorator priority
Priority for Decorators that must apply last
The ITestDecorator interface is exposed by a class that knows how to
enhance the functionality of a test case or suite by decorating it.
Examine the a Test and either return it as is, modify it
or return a different TestCase.
The Test to be decorated
The MethodInfo used to construct the test
The resulting Test
Enumeration expressing the level of log messages to be
captured by NUnit and sent to the runner. These happen
to match the standard levels used by log4net, but will
be translated for any other loggers we support.
No logging
Severe error beyond which continuation is not possible
Error that may allow continuation
A warning message
An informational message
Messages used for debugging
All of the preceding plus more detailled messages if supported
CategoryFilter is able to select or exclude tests
based on their categories.
Interface to be implemented by filters applied to tests.
The filter applies when running the test, after it has been
loaded, since this is the only time an ITest exists.
Interface to be implemented by filters applied to tests.
The filter applies when running the test, after it has been
loaded, since this is the only time an ITest exists.
Determine if a particular test passes the filter criteria. Pass
may examine the parents and/or descendants of a test, depending
on the semantics of the particular filter
The test to which the filter is applied
True if the test passes the filter, otherwise false
Determine whether the test itself matches the filter criteria,
without examining either parents or descendants.
The test to which the filter is applied
True if the filter matches the any parent of the test
Indicates whether this is the EmptyFilter
Unique Empty filter.
Determine if a particular test passes the filter criteria. The default
implementation checks the test itself, its parents and any descendants.
Derived classes may override this method or any of the Match methods
to change the behavior of the filter.
The test to which the filter is applied
True if the test passes the filter, otherwise false
Determine whether the test itself matches the filter criteria, without
examining either parents or descendants.
The test to which the filter is applied
True if the filter matches the any parent of the test
Determine whether any ancestor of the test mateches the filter criteria
The test to which the filter is applied
True if the filter matches the an ancestor of the test
Determine whether any descendant of the test matches the filter criteria.
The test to be matched
True if at least one descendant matches the filter criteria
Indicates whether this is the EmptyFilter
Nested class provides an empty filter - one that always
returns true when called, unless the test is marked explicit.
Construct an empty CategoryFilter
Construct a CategoryFilter using a single category name
A category name
Construct a CategoryFilter using an array of category names
An array of category names
Add a category name to the filter
A category name
Check whether the filter matches a test
The test to be matched
Return the string representation of a category filter
Gets the list of categories from this filter
ParameterSet encapsulates method arguments and
other selected parameters needed for constructing
a parameterized test case.
The ITestCaseData interface is implemented by a class
that is able to return complete testcases for use by
a parameterized test method.
NOTE: This interface is used in both the framework
and the core, even though that results in two different
types. However, sharing the source code guarantees that
the various implementations will be compatible and that
the core is able to reflect successfully over the
framework implementations of ITestCaseData.
Gets the argument list to be provided to the test
Gets the expected result
Indicates whether a result has been specified.
This is necessary because the result may be
null, so it's value cannot be checked.
Gets the expected exception Type
Gets the FullName of the expected exception
Gets the name to be used for the test
Gets the description of the test
Gets a value indicating whether this is ignored.
true if ignored; otherwise, false.
Gets a value indicating whether this is explicit.
true if explicit; otherwise, false.
Gets the ignore reason.
The ignore reason.
A dictionary of properties, used to add information
to tests without requiring the class to change.
Construct a non-runnable ParameterSet, specifying
the provider excetpion that made it invalid.
Construct an empty parameter set, which
defaults to being Runnable.
Constructs a ParameterSet from another object, accessing properties
by reflection. The object must expose at least an Arguments property
in order for the test to be runnable.
The RunState for this set of parameters.
Holds any exception thrown by the parameter provider
The arguments to be used in running the test,
which must match the method signature.
The original arguments supplied by the user,
used for display purposes.
The Type of any exception that is expected.
The FullName of any exception that is expected
The Message of any exception that is expected
Gets or sets the type of match to be performed on the expected message
The expected result of the test, which
must match the method return type.
Returns true if an expected result has been
specified for this parameter set.
A description to be applied to this test case
A name to be used for this test case in lieu
of the standard generated name containing
the argument list.
Gets or sets a value indicating whether this is ignored.
true if ignored; otherwise, false.
Gets or sets a value indicating whether this is explicit.
true if explicit; otherwise, false.
Gets or sets the ignore reason.
The ignore reason.
Gets a list of categories associated with this test.
Gets the property dictionary for this test
NUnitAddinAttribute is used to mark all add-ins. The marked class
must implement the IAddin interface.
The name of this addin
A description for the addin
The type of extension provided
Default Constructor
Summary description for TestFramework.
The name of the framework
The file name of the assembly that defines the framwork
Constructs a TestFramwork object given its name and assembly name.
The ISuiteBuilder interface is exposed by a class that knows how to
build a suite from one or more Types.
Examine the type and determine if it is suitable for
this builder to use in building a TestSuite.
Note that returning false will cause the type to be ignored
in loading the tests. If it is desired to load the suite
but label it as non-runnable, ignored, etc., then this
method must return true.
The type of the fixture to be used
True if the type can be used to build a TestSuite
Build a TestSuite from type provided.
The type of the fixture to be used
A TestSuite
The IExtensionHost interface is implemented by each
of NUnit's Extension hosts. Currently, there is
only one host, which resides in the test domain.
Return an extension point by name, if present
The name of the extension point
The extension point, if found, otherwise null
Get a list of the ExtensionPoints provided by this host.
Get an interface to the framework registry
Gets the ExtensionTypes supported by this host
An enum indicating the ExtensionTypes supported
The TestResult class represents
the result of a test and is used to
communicate results across AppDomains.
Indicates the result of the test
Indicates the location of a failure
The elapsed time for executing this test
The test that this result pertains to
The stacktrace at the point of failure
Message giving the reason for failure
List of child results
Number of asserts executed by this test
Construct a test result given a TestInfo
The test to be used
Construct a TestResult given an ITest
Construct a TestResult given a TestName
A TestName
Mark the test as succeeding
Mark the test as succeeding and set a message
Mark the test as ignored.
The reason the test was not run
Mark the test as ignored.
The ignore exception that was thrown
Mark the test as ignored.
The reason the test was not run
Stack trace giving the location of the command
Mark the test as skipped.
The reason the test was not run
Mark the test a not runnable with a reason
The reason the test is invalid
Mark the test as not runnable due to a builder exception
The exception thrown by the builder or an addin
Set the result of the test
The ResultState to use in the result
The reason the test was not run
Stack trace giving the location of the command
The location of the failure, if any
Set the result of the test
The ResultState to use in the result
The reason the test was not run
Stack trace giving the location of the command
Set the result of the test.
The ResultState to use in the result
The exception that caused this result
The site at which an error or failure occured
Mark the test as a failure due to an
assertion having failed.
Message to display
Stack trace giving the location of the failure
Mark the test as a failure due to an
assertion having failed.
Message to display
Stack trace giving the location of the failure
The site of the failure
Marks the result as an error due to an exception thrown
by the test.
The exception that was caught
Marks the result as an error due to an exception thrown
from the indicated FailureSite.
The exception that was caught
The site from which it was thrown
Add a child result
The child result to be added
Gets the ResultState of the test result, which
indicates the success or failure of the test.
Gets the stage of the test in which a failure
or error occured.
Indicates whether the test executed
Gets the name of the test result
Gets the full name of the test result
Gets the test associated with this result
Indicates whether the test ran successfully
Indicates whether the test failed
Indicates whether the test had an error (as opposed to a failure)
Gets a description associated with the test
Gets the elapsed time for running the test
Gets the message associated with a test
failure or with not running the test
Gets any stacktrace associated with an
error or failure.
Gets or sets the count of asserts executed
when running the test.
Return true if this result has any child results
Gets a list of the child results of this TestResult
Represents a single point of extension for NUnit. Some extension
points may accept only a single extension, while others may
accept more than one at the same time.
Install an extension at this extension point. If the
extension object does not meet the requirements for
this extension point, an exception is thrown.
The extension to install
Removes an extension from this extension point. If the
extension object is not present, the method returns
without error.
Get the name of this extension point
Get the host that provides this extension point
Represents a single point of extension for NUnit. Some extension
points may accept only a single extension, while others may
accept more than one at the same time. This interface enhances
IExtensionPoint by allowing specification of a priority
order for applying addins.
Install an extension at this extension point specifying
an integer priority value for the extension.If the
extension object does not meet the requirements for
this extension point, or if the extension point does
not support the requested priority level, an exception
is thrown.
The extension to install
The priority level for this extension
TestID encapsulates a unique identifier for tests. As
currently implemented, this is an integer and is unique
within the AppDomain. TestID is one component of a
TestName. We use this object, rather than a raw int,
for two reasons: (1) to hide the implementation so
it may be changed later if necessary and (2) so that the
id may be null in a "weak" TestName.
The int key that distinguishes this test from all others created
by the same runner.
Static value to seed ids. It's started at 1000 so any
uninitialized ids will stand out.
Construct a new TestID
Construct a TestID with a given value.
Used in parsing test names and in order
to construct an artificial test node for
aggregating multiple test runners.
Parse a TestID from it's string representation
Override of Equals method to allow comparison of TestIDs
Override of GetHashCode for TestIDs
Override ToString() to display the int id
Operator == override
Operator != override
Clone this TestID
An identical TestID
Summary description for NameFilter.
Construct an empty NameFilter
Construct a NameFilter for a single TestName
Add a TestName to a NameFilter
Check if a test matches the filter
The test to match
True if it matches, false if not
The IDataPointProvider interface is used by extensions
that provide data for a single test parameter.
Determine whether any data is available for a parameter.
A ParameterInfo representing one
argument to a parameterized test
True if any data is available, otherwise false.
Return an IEnumerable providing data for use with the
supplied parameter.
A ParameterInfo representing one
argument to a parameterized test
An IEnumerable providing the required data
The IDataPointProvider2 interface extends IDataPointProvider
by making the test fixture for which the test is being built
available for use.
Determine whether any data is available for a parameter.
A ParameterInfo representing one
argument to a parameterized test
The test suite for which the test is being built
True if any data is available, otherwise false.
Return an IEnumerable providing data for use with the
supplied parameter.
A ParameterInfo representing one
argument to a parameterized test
The test suite for which the test is being built
An IEnumerable providing the required data
SimpleName filter selects tests based on their name
Construct an empty SimpleNameFilter
Construct a SimpleNameFilter for a single name
The name the filter will recognize.
Construct a SimpleNameFilter for an array of names
The names the filter will recognize.
Add a name to a SimpleNameFilter
The name to be added.
Add an array of names to a SimpleNameFilter
The name to be added.
Check whether the filter matches a test
The test to be matched
True if it matches, otherwise false
The IFrameworkRegistry allows extensions to register new
frameworks or emulations of other frameworks.
Register a framework
The name of the framework
The name of the assembly that the tests reference
The TestOutput class holds a unit of output from
a test to either stdOut or stdErr
Construct with text and an ouput destination type
Text to be output
Destination of output
Return string representation of the object for debugging
Get the text
Get the output type
Enum representing the output destination
It uses combinable flags so that a given
output control can accept multiple types
of output. Normally, each individual
output uses a single flag value.
Send output to stdOut
Send output to stdErr
Send output to Trace
Send output to Log
TestNode represents a single test or suite in the test hierarchy.
TestNode holds common info needed about a test and represents a
single node - either a test or a suite - in the hierarchy of tests.
TestNode extends TestInfo, which holds all the information with
the exception of the list of child classes. When constructed from
a Test, TestNodes are always fully populated with child TestNodes.
Like TestInfo, TestNode is purely a data class, and is not able
to execute tests.
For a test suite, the child tests or suites
Null if this is not a test suite
Construct from an ITest
Test from which a TestNode is to be constructed
Construct a TestNode given a TestName and an
array of child tests.
The TestName of the new test
An array of tests to be added as children of the new test
Gets the parent test of the current test
Array of child tests, null if this is a test case.
The RunState enum indicates whether a test
can be executed. When used on a TestResult
it may also indicate whether the test has
been executed. See individual values for
restrictions on use.
The test is not runnable.
The test is runnable. This value would
normally not appear on a TestResult, since
it would change to Executed.
The test can only be run explicitly. Would
normally not appear on a TestResult, since
it would change to Executed or Skipped.
The test has been skipped. This value may
appear on a Test when certain attributes
are used to skip the test.
The test has been ignored. May appear on
a Test, when the IgnoreAttribute is used.
Appears on a TestResult in that case or
if the test is dynamically ignored.
Represents the manner in which test assemblies are
distributed across processes.
Use the default setting, depending on the runner
and the nature of the tests to be loaded.
Run tests directly in the NUnit process
Run tests in a single separate process
Run tests in a separate process per assembly
Represents the manner in which test assemblies use
AppDomains to provide isolation
Use the default setting, depending on the runner
and the nature of the tests to be loaded.
Don't create a test domain - run in the primary AppDomain
Run tests in a single separate test domain
Run tests in a separate domain per assembly
TestPackage holds information about a set of tests to
be loaded by a TestRunner. It may represent a single
assembly or a set of assemblies. It supports selection
of a single test fixture for loading.
Construct a package, specifying the name of the package.
If the package name is an assembly file type (dll or exe)
then the resulting package represents a single assembly.
Otherwise it is a container for multiple assemblies.
The name of the package
Construct a package, specifying the name to be used
and a list of assemblies.
The package name, used to name the top-level test node
The list of assemblies comprising the package
Return the value of a setting or a default.
The name of the setting
The default value
Return the value of a string setting or a default.
The name of the setting
The default value
Return the value of a bool setting or a default.
The name of the setting
The default value
Return the value of an int setting or a default.
The name of the setting
The default value
Return the value of a enum setting or a default.
The name of the setting
The default value
Gets the name of the package
Gets the full name of the package, which is usually
the path to the NUnit project used to create the it
The BasePath to be used in loading the assemblies
The configuration file to be used
Addditional directories to be probed when loading assemblies
Indicates whether the probing path should be generated
automatically based on the list of assemblies.
Assemblies to be loaded. At least one must be specified.
Return true if the package represents a single assembly.
No root node is displayed in that case.
Fully qualified name of test to be loaded. If not
specified, all the tests in the assemblies are loaded.
Gets the dictionary of settings for this TestPackage
TestAssemblyInfo holds information about a loaded test assembly
Constructs a TestAssemblyInfo
The name of the assembly
The version of the runtime for which the assembly was built
The runtime framework under which the assembly is loaded
A list of test framework useds by the assembly
Gets the name of the assembly
Gets the runtime version for which the assembly was built
Gets the runtime framework under which the assembly is loaded
Gets the runtime version under which the assembly is loaded
The Id of the process in which the assembly is loaded
The friendly name of the AppDomain in which the assembly is loaded
The Application Base of the AppDomain in which the assembly is loaded
The PrivateBinPath of the AppDomain in which the assembly is loaded
The ConfigurationFile of the AppDomain in which the assembly is loaded
The name of the main module of the process in which the assembly is loaded
Gets a list of testframeworks referenced by the assembly
OSPlatform represents a particular operating system platform
Platform ID for Unix as defined by Microsoft .NET 2.0 and greater
Platform ID for Unix as defined by Mono
Construct from a platform ID and version
Construct from a platform ID, version and product type
Get the OSPlatform under which we are currently running
Get the platform ID of this instance
Get the Version of this instance
Get the Product Type of this instance
Return true if this is a windows platform
Return true if this is a Unix or Linux platform
Return true if the platform is Win32S
Return true if the platform is Win32Windows
Return true if the platform is Win32NT
Return true if the platform is Windows CE
Return true if the platform is Windows 95
Return true if the platform is Windows 98
Return true if the platform is Windows ME
Return true if the platform is NT 3
Return true if the platform is NT 4
Return true if the platform is NT 5
Return true if the platform is Windows 2000
Return true if the platform is Windows XP
Return true if the platform is Windows 2003 Server
Return true if the platform is NT 6
Return true if the platform is Vista
Return true if the platform is Windows 2008 Server (original or R2)
Return true if the platform is Windows 2008 Server (original)
Return true if the platform is Windows 2008 Server R2
Return true if the platform is Windows 7
Product Type Enumeration used for Windows
Product type is unknown or unspecified
Product type is Workstation
Product type is Domain Controller
Product type is Server
Add-ins are used to extend NUnti. All add-ins must
implement the IAddin interface.
When called, the add-in installs itself into
the host, if possible. Because NUnit uses separate
hosts for the client and test domain environments,
an add-in may be invited to istall itself more than
once. The add-in is responsible for checking which
extension points are supported by the host that is
passed to it and taking the appropriate action.
The host in which to install the add-in
True if the add-in was installed, otehrwise false
The ExtensionType enumeration is used to indicate the
kinds of extensions provided by an Addin. The addin
is only installed by hosts supporting one of its
extension types.
A Core extension is installed by the CoreExtensions
host in each test domain.
A Client extension is installed by all clients
A Gui extension is installed by the gui client
Abstract base for all types of TestAgents.
A TestAgent provides services of locating,
loading and running tests in a particular
context such as an AppDomain or Process.
Reference to the TestAgency that controls this agent
This agent's assigned id
Constructs a TestAgent
Consructor used by TestAgency when creating
an agent.
Starts the agent, performing any required initialization
Stops the agent, releasing any resources
Creates a runner using a given runner id
Dispose is overridden to stop the agent
Overridden to cause object to live indefinitely
The TestAgency with which this agent is asssociated,
or null if the agent is not tied to an agency.
A Guid that uniquely identifies this agent.
Enumeration identifying a common language
runtime implementation.
Any supported runtime framework
Microsoft .NET Framework
Microsoft .NET Compact Framework
Microsoft Shared Source CLI
Mono
RuntimeFramework represents a particular version
of a common language runtime implementation.
DefaultVersion is an empty Version, used to indicate that
NUnit should select the CLR version to use for the test.
Construct from a runtime type and version
The runtime type of the framework
The version of the framework
Parses a string representing a RuntimeFramework.
The string may be just a RuntimeType name or just
a Version or a hyphentated RuntimeType-Version or
a Version prefixed by 'v'.
Returns the best available framework that matches a target framework.
If the target framework has a build number specified, then an exact
match is needed. Otherwise, the matching framework with the highest
build number is used.
Overridden to return the short name of the framework
Returns true if this framework's supports executing under the
requested target framework. The target is supported if
1. The runtime types are the same or either one is RuntimeType.Any
2. All specified (non-negative) components of the CLR version are equal.
3. The major and minor components of the current framework version are
greater than or equal to the corresponding target components.
The last provision allows tests requiring .NET 2.0 to run under the
3.0 and 3.5 platforms as well.
The RuntimeFramework to be matched.
True on match, otherwise false
Static method to return a RuntimeFramework object
for the framework that is currently in use.
Gets an array of all available frameworks
Returns true if the current RuntimeFramework is available.
In the current implementation, only Mono and Microsoft .NET
are supported.
True if it's available, false if not
The type of this runtime framework
The framework version for this runtime framework
The CLR version for this runtime framework
Return true if any CLR version may be used in
matching this RuntimeFramework object.
Returns the Display name for this framework
Combines multiple filters so that a test must pass one
of them in order to pass this filter.
Constructs an empty OrFilter
Constructs an AndFilter from an array of filters
Adds a filter to the list of filters
The filter to be added
Checks whether the OrFilter is matched by a test
The test to be matched
True if any of the component filters pass, otherwise false
Checks whether the OrFilter is matched by a test
The test to be matched
True if any of the component filters match, otherwise false
Return the string representation of an or filter
Return an array of the composing filters
The AddinStatus enum indicates the load status of an addin.
Not known - default
The addin is enabled but not loaded
The addin is disabled
The addin was loaded successfully
An error was encountered loading the addin
The IAgency interface is implemented by a TestAgency in
order to allow TestAgents to register with it.
Registers an agent with an agency
Combines multiple filters so that a test must pass all
of them in order to pass this filter.
Constructs an empty AndFilter
Constructs an AndFilter from an array of filters
Adds a filter to the list of filters
The filter to be added
Checks whether the AndFilter is matched by a test
The test to be matched
True if all the component filters pass, otherwise false
Checks whether the AndFilter is matched by a test
The test to be matched
True if all the component filters match, otherwise false
Return string representation of the filter.
Return an array of the composing filters
The EventListener interface is used within the NUnit core to receive
notifications of significant events while a test is being run. These
events are propogated to any client, which may choose to convert them
to .NET events or to use them directly.
Called when a test run is starting
The name of the test being started
The number of test cases under this test
Called when a run finishes normally
The result of the test
Called when a run is terminated due to an exception
Exception that was thrown
Called when a test case is starting
The name of the test case
Called when a test case has finished
The result of the test
Called when a suite is starting
The name of the suite
Called when a suite has finished
The result of the suite
Called when an unhandled exception is detected during
the execution of a test run.
The exception thta was detected
Called when the test direts output to the console.
A console message
NotFilter negates the operation of another filter
Construct a not filter on another filter
The filter to be negated
Check whether the filter matches a test
The test to be matched
True if it matches, otherwise false
Determine whether any descendant of the test matches the filter criteria.
The test to be matched
True if at least one descendant matches the filter criteria
Return string representation of the filter
Indicates whether this is a top-level NotFilter,
requiring special handling of Explicit
Gets the base filter
The ITestCaseProvider interface is used by extensions
that provide data for parameterized tests, along with
certain flags and other indicators used in the test.
Determine whether any test cases are available for a parameterized method.
A MethodInfo representing a parameterized test
True if any cases are available, otherwise false.
Return an IEnumerable providing test cases for use in
running a paramterized test.
ITestCaseProvider2 extends ITestCaseProvider with methods
that include the suite for which the test case is being
built. TestCaseProviders not needing the suite can
continue to implement ITestCaseBuilder.
Determine whether any test cases are available for a parameterized method.
A MethodInfo representing a parameterized test
The suite for which the test case is being built
True if any cases are available, otherwise false.
Return an IEnumerable providing test cases for use in
running a paramterized test.
The suite for which the test case is being built
The IAddinRegistry interface allows registering addins
and retrieving information about them. It is also used
to record the load status of an addin.
Registers an addin
The addin to be registered
Returns true if an addin of a given name is registered
The name of the addin
True if an addin of that name is registered, otherwise false
Sets the load status of an addin
The name of the addin
The status to be set
An optional message explaining the status
Gets a list of all addins as Addin objects