NUnit.Framework.Interfaces
Namespace with 41 public types
Classes
AssertionResult
The AssertionResult class represents the result of a single assertion.
ResultState
The ResultState class represents the outcome of running a test.
It contains two pieces of information. The Status of the test
is an enum indicating whether the test passed, failed, was
skipped or was inconclusive. The Label provides a more
detailed breakdown for use by client runners.
TestAttachment
The TestAttachment class represents a file attached to a TestResult,
with an optional description.
TestMessage
The class holds a message sent by a test to all listeners
TestOutput
The TestOutput class holds a unit of output from
a test to a specific output stream
TNode
TNode represents a single node in the XML representation
of a Test or TestResult. It replaces System.Xml.XmlNode and
System.Xml.Linq.XElement, providing a minimal set of methods
for operating on the XML in a platform-independent manner.
Enumerations
AssertionStatus
AssertionStatus enumeration represents the possible outcomes of an assertion.
The order of definition is significant, higher level values override lower
ones in determining the overall result of a test.
FailureSite
The FailureSite enum indicates the stage of a test
in which an error or failure occurred.
RunState
The RunState enum indicates whether a test can be executed.
TestStatus
The TestStatus enum indicates the result of running a test
Interfaces
IApplyToContext
The IApplyToContext interface is implemented by attributes
that want to make changes to the execution context before
a test is run.
IApplyToTest
The IApplyToTest interface is implemented by self-applying
attributes that modify the state of a test in some way.
IApplyToTestSuite
The IApplyToTestSuite interface is implemented by self-applying
attributes that modify the state of a test suite in some way.
ICombiningStrategy
CombiningStrategy is the abstract base for classes that
know how to combine values provided for individual test
parameters to create a set of test cases.
ICommandWrapper
ICommandWrapper is implemented by attributes and other
objects able to wrap a TestCommand with another command.
IFixtureBuilder
The IFixtureBuilder interface is exposed by a class that knows how to
build test fixtures from a specified type. In general, it is exposed
by an attribute, but it may be implemented in a helper class used by the
attribute in some cases.
IFixtureBuilder2
The IFixtureBuilder2 interface extends IFixtureBuilder by allowing
use of a PreFilter, which is used to select methods as test cases.
IImplyFixture
IImplyFixture is an empty marker interface used by attributes like
TestAttribute that cause the class where they are used to be treated
as a TestFixture even without a TestFixtureAttribute.
Marker interfaces are not usually considered a good practice, but
we use it here to avoid cluttering the attribute hierarchy with
classes that don't contain any extra implementation.
IMethodInfo
The IMethodInfo class is used to encapsulate information
about a method in a platform-independent manner.
IParameterDataProvider
Provides data for a single test parameter.
IParameterDataSource
Provides data for a single test parameter.
IParameterInfo
The IParameterInfo interface is an abstraction of a .NET parameter.
IPreFilter
Implemented by filters for use in deciding which
Types and Methods should be used to generate tests.
IPropertyBag
A PropertyBag represents a collection of name/value pairs
that allows duplicate entries with the same key. Methods
are provided for adding a new pair as well as for setting
a key to a single value. All keys are strings but values
may be of any type. Null values are not permitted, since
a null entry represents the absence of the key.
The entries in a PropertyBag are of two kinds: those that
take a single value and those that take multiple values.
However, the PropertyBag has no knowledge of which entries
fall into each category and the distinction is entirely
up to the code using the PropertyBag.
When working with multi-valued properties, client code
should use the Add method to add name/value pairs and
indexing to retrieve a list of all values for a given
key. For example:
bag.Add("Tag", "one");
bag.Add("Tag", "two");
Assert.That(bag["Tag"],
Is.EqualTo(new string[] { "one", "two" }));
When working with single-valued properties, client code
should use the Set method to set the value and Get to
retrieve the value. The GetSetting methods may also be
used to retrieve the value in a type-safe manner while
also providing default. For example:
bag.Set("Priority", "low");
bag.Set("Priority", "high"); // replaces value
Assert.That(bag.Get("Priority"),
Is.EqualTo("high"));
Assert.That(bag.GetSetting("Priority", "low"),
Is.EqualTo("high"));
IReflectionInfo
The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection.
IRepeatTest
Objects implementing this interface are used to wrap
tests that can repeat. The implementing command is run once,
invoking the chained commands any number of times.
ISimpleTestBuilder
The ISimpleTestBuilder interface is exposed by a class that knows how to
build a single tests from a specified method. In general,
it is exposed by an attribute, but it may be implemented in a helper class
used by the attribute in some cases.
ISuiteBuilder
The ISuiteBuilder interface is exposed by a class that knows how to
build a single test suite from a specified type.
ITest
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.
ITestBuilder
The ITestBuilder interface is exposed by a class that knows how to
build tests from a specified method. In general, it is exposed
by an attribute which has additional information available to provide
the necessary test parameters to distinguish the test cases built.
ITestCaseBuilder
The ITestCaseBuilder interface is exposed by a class that knows how to
build a test from a specified method, possibly containing child test cases.
ITestCaseData
The ITestCaseData interface is implemented by a class
that is able to return complete test cases for use by
a parameterized test method.
ITestData
The ITestData interface is implemented by a class that
represents a single instance of a parameterized test.
ITestFilter
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.
ITestFixtureData
The ITestCaseData interface is implemented by a class
that is able to return the data required to create an
instance of a parameterized test fixture.
ITestListener
The ITestListener interface is used internally to receive
notifications of significant events while a test is being
run. The events are propagated to clients by means of an
AsyncCallback. NUnit extensions may also monitor these events.
ITestResult
The ITestResult interface represents the result of a test.
ITypeInfo
The ITypeInfo interface is an abstraction of a .NET Type
IWrapSetUpTearDown
Objects implementing this interface are used to wrap
the entire test, including SetUp and TearDown.
IWrapTestMethod
Objects implementing this interface are used to wrap
the TestMethodCommand itself. They apply after SetUp
has been run and before TearDown.
IXmlNodeBuilder
An object implementing IXmlNodeBuilder is able to build
an XML representation of itself and any children.