nunit.framework
SubstringConstraint can test whether a string contains
the expected substring.
The Constraint class is the base of all built-in or
user-defined constraints in NUnit. It provides the operator
overloads used to combine constraints.
Static UnsetObject used to detect derived constraints
failing to set the actual value.
If true, all string comparisons will ignore case
If true, arrays will be treated as collections, allowing
those of different dimensions to be compared
If non-zero, equality comparisons within the specified
tolerance will succeed.
IComparer object used in comparisons for some constraints.
The actual value being tested against a constraint
Flag the constraint to use a tolerance when determining equality.
Currently only used for doubles and floats.
Tolerance to be used
Self.
Flag the constraint to use the supplied IComparer object.
The IComparer object to use.
Self.
Write the failure message to the MessageWriter provided
as an argument. The default implementation simply passes
the constraint and the actual value to the writer, which
then displays the constraint description and the value.
Constraints that need to provide additional details,
such as where the error occured can override this.
The MessageWriter on which to display the message
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
Write the actual value for a failing constraint test to a
MessageWriter. The default implementation simply writes
the raw value of actual, leaving it to the writer to
perform any formatting.
The writer on which the actual value is displayed
This operator creates a constraint that is satisfied only if both
argument constraints are satisfied.
This operator creates a constraint that is satisfied if either
of the argument constraints is satisfied.
This operator creates a constraint that is satisfied if the
argument constraint is not satisfied.
Flag the constraint to ignore case and return self.
Flag the constraint to compare arrays as collections
and return self.
Class used to detect any derived constraints
that fail to set the actual value in their
Matches override.
Initializes a new instance of the class.
The expected.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
StartsWithConstraint can test whether a string starts
with an expected substring.
Initializes a new instance of the class.
The expected string
Test whether the constraint is matched by the actual value.
This is a template method, which calls the IsMatch method
of the derived class.
Write the constraint description to a MessageWriter
The writer on which the description is displayed
EndsWithConstraint can test whether a string ends
with an expected substring.
Initializes a new instance of the class.
The expected string
Test whether the constraint is matched by the actual value.
This is a template method, which calls the IsMatch method
of the derived class.
Write the constraint description to a MessageWriter
The writer on which the description is displayed
RegexConstraint can test whether a string matches
the pattern provided.
Initializes a new instance of the class.
The pattern.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
EmptyConstraint tests a whether a string or collection is empty,
postponing the decision about which test is applied until the
type of the actual argument is known.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
ConstraintBuilder is used to resolve the Not and All properties,
which serve as prefix operators for constraints. With the addition
of an operand stack, And and Or could be supported, but we have
left them out in favor of a simpler, more type-safe implementation.
Use the & and | operator overloads to combine constraints.
Implicitly convert ConstraintBuilder to an actual Constraint
at the point where the syntax demands it.
Resolves the chain of constraints using an
EqualConstraint as base.
Resolves the chain of constraints using a
SameAsConstraint as base.
Resolves the chain of constraints using a
LessThanConstraint as base.
Resolves the chain of constraints using a
GreaterThanConstraint as base.
Resolves the chain of constraints using a
LessThanOrEqualConstraint as base.
Resolves the chain of constraints using a
LessThanOrEqualConstraint as base.
Resolves the chain of constraints using a
GreaterThanOrEqualConstraint as base.
Resolves the chain of constraints using a
GreaterThanOrEqualConstraint as base.
Resolves the chain of constraints using an
ExactTypeConstraint as base.
Resolves the chain of constraints using an
InstanceOfTypeConstraint as base.
Resolves the chain of constraints using an
AssignableFromConstraint as base.
Resolves the chain of constraints using a
ContainsConstraint as base. This constraint
will, in turn, make use of the appropriate
second-level constraint, depending on the
type of the actual argument.
Resolves the chain of constraints using a
CollectionContainsConstraint as base.
The expected object
Resolves the chain of constraints using a
StartsWithConstraint as base.
Resolves the chain of constraints using a
StringEndingConstraint as base.
Resolves the chain of constraints using a
StringMatchingConstraint as base.
Resolves the chain of constraints using a
CollectionEquivalentConstraint as base.
Resolves the chain of constraints using a
CollectionContainingConstraint as base.
Resolves the chain of constraints using a
CollectionSubsetConstraint as base.
Resolves the chain of constraints using a
PropertyConstraint as base
Resolves the chain of constraints using a
PropertyCOnstraint on Length as base
Resolves the chain of constraints using a
PropertyCOnstraint on Length as base
Modifies the ConstraintBuilder by pushing a Prop operator on the
ops stack and the name of the property on the opnds stack.
Resolve a constraint that has been recognized by applying
any pending operators and returning the resulting Constraint.
A constraint that incorporates all pending operators
Resolves the chain of constraints using
EqualConstraint(null) as base.
Resolves the chain of constraints using
EqualConstraint(true) as base.
Resolves the chain of constraints using
EqualConstraint(false) as base.
Resolves the chain of constraints using
Is.NaN as base.
Resolves the chain of constraints using
Is.Empty as base.
Resolves the chain of constraints using
Is.Unique as base.
Modifies the ConstraintBuilder by pushing a Not operator on the stack.
Modifies the ConstraintBuilder by pushing a Not operator on the stack.
Modifies the ConstraintBuilder by pushing an All operator on the stack.
Modifies the ConstraintBuilder by pushing a Some operator on the stack.
Modifies the constraint builder by pushing All and Not operators on the stack
CollectionConstraint is the abstract base class for
constraints that operate on collections.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Protected method to be implemented by derived classes
CollectionTally counts (tallies) the number of
occurences of each object in one or more enuerations.
Construct a CollectionTally object from a collection
Remove the counts for a collection from the tally,
so long as their are sufficient items to remove.
The tallies are not permitted to become negative.
The collection to remove
True if there were enough items to remove, otherwise false
Test whether all the counts are equal to a given value
The value to be looked for
True if all counts are equal to the value, otherwise false
Get the count of the number of times an object is present in the tally
UniqueItemsConstraint tests whether all the items in a
collection are unique.
Apply the item constraint to each item in the collection,
failing if any item fails.
Write a description of this constraint to a MessageWriter
CollectionContainsConstraint is used to test whether a collection
contains an expected object as a member.
Construct a CollectionContainsConstraint
Test whether the expected item is contained in the collection
Write a descripton of the constraint to a MessageWriter
CollectionEquivalentCOnstraint is used to determine whether two
collections are equivalent.
Construct a CollectionEquivalentConstraint
Test whether two collections are equivalent
Write a description of this constraint to a MessageWriter
CollectionSubsetConstraint is used to determine whether
one collection is a subset of another
Construct a CollectionSubsetConstraint
The collection that the actual value is expected to be a subset of
Test whether the actual collection is a subset of
the expected collection provided.
Write a description of this constraint to a MessageWriter
EqualConstraint is able to compare an actual value with the
expected value provided in its constructor.
Initializes a new instance of the class.
The expected value.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write a failure message. Overridden to provide custom
failure messages for EqualConstraint.
The MessageWriter to write to
Write description of this constraint
The MessageWriter to write to
Helper method to compare two arrays
Display the failure information for two collections that did not match.
The MessageWriter on which to display
The expected collection.
The actual collection
The depth of this failure in a set of nested collections
Displays a single line showing the types and sizes of the expected
and actual collections or arrays. If both are identical, the value is
only shown once.
The MessageWriter on which to display
The expected collection or array
The actual collection or array
The indentation level for the message line
Displays a single line showing the point in the expected and actual
arrays at which the comparison failed. If the arrays have different
structures or dimensions, both values are shown.
The MessageWriter on which to display
The expected array
The actual array
Index of the failure point in the underlying collections
The indentation level for the message line
Abstract base class used for prefixes
The base constraint
Construct given a base constraint
Set all modifiers applied to the prefix into
the base constraint before matching
NotConstraint negates the effect of some other constraint
Initializes a new instance of the class.
The base constraint to be negated.
Test whether the constraint is satisfied by a given value
The value to be tested
True for if the base constraint fails, false if it succeeds
Write the constraint description to a MessageWriter
The writer on which the description is displayed
Write the actual value for a failing constraint test to a MessageWriter.
The writer on which the actual value is displayed
AllItemsConstraint applies another constraint to each
item in a collection, succeeding if they all succeed.
Construct an AllItemsConstraint on top of an existing constraint
Apply the item constraint to each item in the collection,
failing if any item fails.
Write a description of this constraint to a MessageWriter
SomeItemsConstraint applies another constraint to each
item in a collection, succeeding if any of them succeeds.
Construct a SomeItemsConstraint on top of an existing constraint
Apply the item constraint to each item in the collection,
failing if any item fails.
Write a description of this constraint to a MessageWriter
SomeItemsConstraint applies another constraint to each
item in a collection, succeeding if any of them succeeds.
Construct a SomeItemsConstraint on top of an existing constraint
Apply the item constraint to each item in the collection,
failing if any item fails.
Write a description of this constraint to a MessageWriter
SameAsConstraint tests whether an object is identical to
the object passed to its constructor
Initializes a new instance of the class.
The expected object.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
TypeConstraint is the abstract base for constraints
that take a Type as their expected value.
The expected Type used by the constraint
Construct a TypeConstraint for a given Type
Write the actual value for a failing constraint test to a
MessageWriter. TypeCOnstraints override this method to write
the name of the type.
The writer on which the actual value is displayed
ExactTypeConstraint is used to test that an object
is of the exact type provided in the constructor
Construct an ExactTypeConstraint for a given Type
Test that an object is of the exact type specified
Write the description of this constraint to a MessageWriter
InstanceOfTypeConstraint is used to test that an object
is of the same type provided or derived from it.
Construct an InstanceOfTypeConstraint for the type provided
Test whether an object is of the specified type or a derived type
Write a description of this constraint to a MessageWriter
AssignableFromConstraint is used to test that an object
can be assigned from a given Type.
Construct an AssignableFromConstraint for the type provided
Test whether an object can be assigned from the specified type
Write a description of this constraint to a MessageWriter
Abstract base class for constraints that compare values to
determine if one is greater than, equal to or less than
the other.
The value against which a comparison is to be made
If true, less than returns success
if true, equal returns success
if true, greater than returns success
The predicate used as a part of the description
Initializes a new instance of the class.
The value against which to make a comparison.
if set to true less succeeds.
if set to true equal succeeds.
if set to true greater succeeds.
String used in describing the constraint.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
Tests whether a value is greater than the value supplied to its constructor
Initializes a new instance of the class.
The expected value.
Tests whether a value is greater than or equal to the value supplied to its constructor
Initializes a new instance of the class.
The expected value.
Tests whether a value is less than the value supplied to its constructor
Initializes a new instance of the class.
The expected value.
Tests whether a value is less than or equal to the value supplied to its constructor
Initializes a new instance of the class.
The expected value.
ContainsConstraint tests a whether a string contains a substring
or a collection contains an object. It postpones the decision of
which test to use until the type of the actual argument is known.
This allows testing whether a string is contained in a collection
or as a substring of another string using the same syntax.
Initializes a new instance of the class.
The expected.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
Summary description for PropertyConstraint.
Initializes a new instance of the class.
The name.
The constraint to apply to the property.
Test whether the constraint is satisfied by a given value
The value to be tested
True for success, false for failure
Write the constraint description to a MessageWriter
The writer on which the description is displayed
Write the actual value for a failing constraint test to a
MessageWriter. The default implementation simply writes
the raw value of actual, leaving it to the writer to
perform any formatting.
The writer on which the actual value is displayed
BinaryOperation is the abstract base of all constraints
that combine two other constraints in some fashion.
The first constraint being combined
The second constraint being combined
Construct a BinaryOperation from two other constraints
The first constraint
The second constraint
AndConstraint succeeds only if both members succeed.
Create an AndConstraint from two other constraints
The first constraint
The second constraint
Apply both member constraints to an actual value, succeeding
succeeding only if both of them succeed.
The actual value
True if the constraints both succeeded
Write a description for this contraint to a MessageWriter
The MessageWriter to receive the description
OrConstraint succeeds if either member succeeds
Create an OrConstraint from two other constraints
The first constraint
The second constraint
Apply the member constraints to an actual value, succeeding
succeeding as soon as one of them succeeds.
The actual value
True if either constraint succeeded
Write a description for this contraint to a MessageWriter
The MessageWriter to receive the description
The Numerics class contains common operations on numeric values.
Checks the type of the object, returning true if
the object is a numeric type.
The object to check
true if the object is a numeric type
Checks the type of the object, returning true if
the object is a floating point numeric type.
The object to check
true if the object is a floating point numeric type
Checks the type of the object, returning true if
the object is a fixed point numeric type.
The object to check
true if the object is a fixed point numeric type
The Is class is a helper class with properties and methods
that supply a number of constraints used in Asserts.
Is.Null returns a static constraint that tests for null
Is.True returns a static constraint that tests whether a value is true
Is.False returns a static constraint that tests whether a value is false
Is.NaN returns a static constraint that tests whether a value is an NaN
Is.Empty returns a static constraint that tests whether a string or collection is empty
Is.Unique returns a static constraint that tests whether a collection contains all unque items.
Is.EqualTo returns a constraint that tests whether the
actual value equals the supplied argument
Is.SameAs returns a constraint that tests whether the
actual value is the same object as the supplied argument.
Is.GreaterThan returns a constraint that tests whether the
actual value is greater than the suppled argument
Is.GreaterThanOrEqualTo returns a constraint that tests whether the
actual value is greater than or equal to the suppled argument
Is.AtLeast is a synonym for Is.GreaterThanOrEqualTo
Is.LessThan returns a constraint that tests whether the
actual value is less than the suppled argument
Is.LessThanOrEqualTo returns a constraint that tests whether the
actual value is less than or equal to the suppled argument
Is.AtMost is a synonym for Is.LessThanOrEqualTo
Is.TypeOf returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.
Is.InstanceOfType returns a constraint that tests whether
the actual value is of the type supplied as an argument
or a derived type.
Is.AssignableFrom returns a constraint that tests whether
the actual value is assignable from the type supplied as
an argument.
Is.EquivalentTo returns a constraint that tests whether
the actual value is a collection containing the same
elements as the collection supplied as an arument
Is.SubsetOf returns a constraint that tests whether
the actual value is a subset of the collection
supplied as an arument
Is.Not returns a ConstraintBuilder that negates
the constraint that follows it.
Is.All returns a ConstraintBuilder, which will apply
the following constraint to all members of a collection,
succeeding if all of them succeed. This property is
a synonym for Has.AllItems.
The Iz class is a synonym for Is intended for use in VB,
which regards Is as a keyword.
The Text class is a helper class with properties and methods
that supply a number of constraints used with strings.
Contains returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
DoesNotContain returns a constraint that fails if the actual
value contains the substring supplied as an argument.
StartsWith returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
DoesNotStartWith returns a constraint that fails if the actual
value starts with the substring supplied as an argument.
EndsWith returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
DoesNotEndWith returns a constraint that fails if the actual
value ends with the substring supplied as an argument.
Matches returns a constraint that succeeds if the actual
value matches the pattern supplied as an argument.
DoesNotMatch returns a constraint that failss if the actual
value matches the pattern supplied as an argument.
Text.All returns a ConstraintBuilder, which will apply
the following constraint to all members of a collection,
succeeding if all of them succeed.
The List class is a helper class with properties and methods
that supply a number of constraints used with lists and collections.
List.Map returns a ListMapper, which can be used to map
the original collection to another collection.
ListMapper is used to transform a collection used as an actual argument
producing another collection to be used in the assertion.
Construct a ListMapper based on a collection
The collection to be transformed
Produces a collection containing all the values of a property
The collection of property values
Summary description for HasNoPrefixB.
Returns a new ConstraintBuilder, which will apply the
following constraint to a named property of the object
being tested.
The name of the property
Returns a new PropertyConstraint checking for the
existence of a particular property value.
The name of the property to look for
The expected value of the property
Returns a new PropertyConstraint for the Length property
Returns a new PropertyConstraint or the Count property
Returns a new CollectionContainsConstraint checking for the
presence of a particular object in the collection.
The expected object
Has.No returns a ConstraintBuilder that negates
the constraint that follows it.
Has.AllItems returns a ConstraintBuilder, which will apply
the following constraint to all members of a collection,
succeeding if all of them succeed.
Has.Some returns a ConstraintBuilder, which will apply
the following constraint to all members of a collection,
succeeding if any of them succeed. It is a synonym
for Has.Item.
Has.None returns a ConstraintBuilder, which will apply
the following constraint to all members of a collection,
succeeding only if none of them succeed.
Nested class that allows us to restrict the number
of key words that may appear after Has.No.
Return a ConstraintBuilder conditioned to apply
the following constraint to a property.
The property name
A ConstraintBuilder
Return a Constraint that succeeds if the expected object is
not contained in a collection.
The expected object
A Constraint
The Assert class contains a collection of static methods that
implement the most common assertions used in NUnit.
We don't actually want any instances of this object, but some people
like to inherit from it to add other static methods. Hence, the
protected constructor disallows any instances of this object.
The Equals method throws an AssertionException. This is done
to make sure there is no mistake by calling this function.
override the default ReferenceEquals to throw an AssertionException. This
implementation makes sure there is no mistake in calling this function
as part of Assert.
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
The message to display if the condition is false
Arguments to be used in formatting the message
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
The message to display if the condition is false
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
Asserts that a condition is false. If the condition is true the method throws
an .
The evaluated condition
The message to display if the condition is true
Arguments to be used in formatting the message
Asserts that a condition is false. If the condition is true the method throws
an .
The evaluated condition
The message to display if the condition is true
Asserts that a condition is false. If the condition is true the method throws
an .
The evaluated condition
Verifies that the object that is passed in is not equal to null
If the object is null
then an
is thrown.
The object that is to be tested
The message to be displayed when the object is null
Arguments to be used in formatting the message
Verifies that the object that is passed in is not equal to null
If the object is null
then an
is thrown.
The object that is to be tested
The message to be displayed when the object is null
Verifies that the object that is passed in is not equal to null
If the object is null
then an
is thrown.
The object that is to be tested
Verifies that the object that is passed in is equal to null
If the object is not null
then an
is thrown.
The object that is to be tested
The message to be displayed when the object is not null
Arguments to be used in formatting the message
Verifies that the object that is passed in is equal to null
If the object is not null
then an
is thrown.
The object that is to be tested
The message to be displayed when the object is not null
Verifies that the object that is passed in is equal to null
If the object is not null null
then an
is thrown.
The object that is to be tested
Verifies that the double is passed is an NaN
value.
If the object is not NaN
then an
is thrown.
The value that is to be tested
The message to be displayed when the object is not null
Arguments to be used in formatting the message
Verifies that the double is passed is an NaN
value.
If the object is not NaN
then an
is thrown.
The object that is to be tested
The message to be displayed when the object is not null
Verifies that the double is passed is an NaN
value.
If the object is not NaN
then an
is thrown.
The object that is to be tested
Assert that a string is empty - that is equal to string.Empty
The string to be tested
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that a string is empty - that is equal to string.Emtpy
The string to be tested
The message to be displayed on failure
Assert that a string is empty - that is equal to string.Emtpy
The string to be tested
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Assert that an array,list or other collection is empty
An array, list or other collection implementing ICollection
Assert that a string is not empty - that is not equal to string.Empty
The string to be tested
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that a string is empty - that is equal to string.Emtpy
The string to be tested
The message to be displayed on failure
Assert that a string is empty - that is equal to string.Emtpy
The string to be tested
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Assert that an array,list or other collection is empty
An array, list or other collection implementing ICollection
Asserts that an object may be assigned a value of a given Type.
The expected Type.
The object under examination
Asserts that an object may be assigned a value of a given Type.
The expected Type.
The object under examination
The messge to display in case of failure
Asserts that an object may be assigned a value of a given Type.
The expected Type.
The object under examination
The message to display in case of failure
Array of objects to be used in formatting the message
Asserts that an object may not be assigned a value of a given Type.
The expected Type.
The object under examination
Asserts that an object may not be assigned a value of a given Type.
The expected Type.
The object under examination
The messge to display in case of failure
Asserts that an object may not be assigned a value of a given Type.
The expected Type.
The object under examination
The message to display in case of failure
Array of objects to be used in formatting the message
Asserts that an object is an instance of a given type.
The expected Type
The object being examined
Asserts that an object is an instance of a given type.
The expected Type
The object being examined
A message to display in case of failure
Asserts that an object is an instance of a given type.
The expected Type
The object being examined
A message to display in case of failure
An array of objects to be used in formatting the message
Asserts that an object is not an instance of a given type.
The expected Type
The object being examined
Asserts that an object is not an instance of a given type.
The expected Type
The object being examined
A message to display in case of failure
Asserts that an object is not an instance of a given type.
The expected Type
The object being examined
A message to display in case of failure
An array of objects to be used in formatting the message
Verifies that two ints are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two ints are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Verifies that two ints are equal. If they are not, then an
is thrown.
The expected value
The actual value
Verifies that two longs are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two longs are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Verifies that two longs are equal. If they are not, then an
is thrown.
The expected value
The actual value
Verifies that two uints are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two uints are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Verifies that two uints are equal. If they are not, then an
is thrown.
The expected value
The actual value
Verifies that two ulongs are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two ulongs are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Verifies that two ulongs are equal. If they are not, then an
is thrown.
The expected value
The actual value
Verifies that two decimals are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two decimal are equal. If they are not, then an
is thrown.
The expected value
The actual value
The message that will be displayed on failure
Verifies that two decimals are equal. If they are not, then an
is thrown.
The expected value
The actual value
Verifies that two doubles are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that two doubles are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
The message that will be displayed on failure
Verifies that two doubles are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
Verifies that two floats are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
The message displayed upon failure
Arguments to be used in formatting the message
Verifies that two floats are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
The message displayed upon failure
Verifies that two floats are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an is
thrown.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
Verifies that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. All
non-numeric types are compared by using the Equals method.
Arrays are compared by comparing each element using the same rules.
If they are not equal an is thrown.
The value that is expected
The actual value
The message to display if objects are not equal
Arguments to be used in formatting the message
Verifies that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. All
non-numeric types are compared by using the Equals method.
If they are not equal an is thrown.
The value that is expected
The actual value
The message to display if objects are not equal
Verifies that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. All
non-numeric types are compared by using the Equals method.
If they are not equal an is thrown.
The value that is expected
The actual value
Asserts that two objects are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two objects are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two objects are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two ints are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two ints are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two ints are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two longss are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two longs are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two longs are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two uints are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two uints are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two uints are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two ulongs are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two ulongs are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two ulong are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two decimals are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two decimals are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two decimals are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two floats are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two floats are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two floats are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two doubles are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two doubles are not equal. If they are equal
an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two doubles are not equal. If they are equal
an is thrown.
The expected object
The actual object
Asserts that two objects refer to the same object. If they
are not the same an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are not the same object.
Arguments to be used in formatting the message
Asserts that two objects refer to the same object. If they
are not the same an is thrown.
The expected object
The actual object
The message to be displayed when the object is null
Asserts that two objects refer to the same object. If they
are not the same an is thrown.
The expected object
The actual object
Asserts that two objects do not refer to the same object. If they
are the same an is thrown.
The expected object
The actual object
The message to be displayed when the two objects are the same object.
Arguments to be used in formatting the message
Asserts that two objects do not refer to the same object. If they
are the same an is thrown.
The expected object
The actual object
The message to be displayed when the objects are the same
Asserts that two objects do not refer to the same object. If they
are the same an is thrown.
The expected object
The actual object
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Asserts that an object is contained in a list.
The expected object
The list to be examined
The message to display in case of failure
Arguments used in formatting the message
Asserts that an object is contained in a list.
The expected object
The list to be examined
The message to display in case of failure
Asserts that an object is contained in a list.
The expected object
The list to be examined
Throws an with the message and arguments
that are passed in. This is used by the other Assert functions.
The message to initialize the with.
Arguments to be used in formatting the message
Throws an with the message that is
passed in. This is used by the other Assert functions.
The message to initialize the with.
Throws an .
This is used by the other Assert functions.
Throws an with the message and arguments
that are passed in. This causes the test to be reported as ignored.
The message to initialize the with.
Arguments to be used in formatting the message
Throws an with the message that is
passed in. This causes the test to be reported as ignored.
The message to initialize the with.
Throws an .
This causes the test to be reported as ignored.
NOTE: The use of asserters for extending NUnit has
now been replaced by the use of constraints. This
method is marked obsolete.
Test the condition asserted by an asserter and throw
an assertion exception using provided message on failure.
An object that implements IAsserter
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure.
A Constraint to be applied
The actual value to test
Apply a constraint to an actual value, succeedingt if the constraint
is satisfied and throwing an assertion exception on failure.
A Constraint to be applied
The actual value to test
The message that will be displayed on failure
Apply a constraint to an actual value, succeedingt if the constraint
is satisfied and throwing an assertion exception on failure.
A Constraint to be applied
The actual value to test
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
The message to display if the condition is false
Arguments to be used in formatting the message
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
The message to display if the condition is false
Asserts that a condition is true. If the condition is false the method throws
an .
The evaluated condition
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater or equal to than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater or equal to than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater or equal to than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than or equal to the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
The message that will be displayed on failure
Verifies that the first value is greater than the second
value. If they are not, then an
is thrown.
The first value, expected to be greater
The second value, expected to be less
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Arguments to be used in formatting the message
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
The message that will be displayed on failure
Verifies that the first value is less than or equal to the second
value. If it is not, then an
is thrown.
The first value, expected to be less
The second value, expected to be greater
Gets the number of assertions executed so far and
resets the counter to zero.
Enumeration indicating how the expected message parameter is to be used
Expect an exact match
Expect a message containing the parameter string
Match the regular expression provided as a parameter
ExpectedExceptionAttribute
Constructor for a non-specific exception
Constructor for a given type of exception
The type of the expected exception
Constructor for a given exception name
The full name of the expected exception
Constructor for a given type of exception and expected message text
The type of the expected exception
The expected message text
Constructor for a given exception name and expected message text
The full name of the expected exception
The expected messge text
Gets or sets the expected exception type
Gets or sets the full Type name of the expected exception
Gets or sets the expected message text
Gets or sets the user message displayed in case of failure
Gets or sets the type of match to be performed on the expected message
Gets the name of a method to be used as an exception handler
A set of Assert methods operationg on one or more collections
The Equals method throws an AssertionException. This is done
to make sure there is no mistake by calling this function.
override the default ReferenceEquals to throw an AssertionException. This
implementation makes sure there is no mistake in calling this function
as part of Assert.
Asserts that all items contained in collection are of the type specified by expectedType.
ICollection of objects to be considered
System.Type that all objects in collection must be instances of
Asserts that all items contained in collection are of the type specified by expectedType.
ICollection of objects to be considered
System.Type that all objects in collection must be instances of
The message that will be displayed on failure
Asserts that all items contained in collection are of the type specified by expectedType.
ICollection of objects to be considered
System.Type that all objects in collection must be instances of
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that all items contained in collection are not equal to null.
ICollection of objects to be considered
Asserts that all items contained in collection are not equal to null.
ICollection of objects to be considered
The message that will be displayed on failure
Asserts that all items contained in collection are not equal to null.
ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Ensures that every object contained in collection exists within the collection
once and only once.
ICollection of objects to be considered
Ensures that every object contained in collection exists within the collection
once and only once.
ICollection of objects to be considered
The message that will be displayed on failure
Ensures that every object contained in collection exists within the collection
once and only once.
ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
The message that will be displayed on failure
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are exactly equal. The collections must have the same count,
and contain the exact same objects in the same order.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are not exactly equal.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
Asserts that expected and actual are not exactly equal.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
Asserts that expected and actual are not exactly equal.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Asserts that expected and actual are not exactly equal.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
The message that will be displayed on failure
Asserts that expected and actual are not exactly equal.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are not exactly equal.
If comparer is not null then it will be used to compare the objects.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The IComparer to use in comparing objects from each ICollection
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that expected and actual are not equivalent.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
Asserts that expected and actual are not equivalent.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Asserts that expected and actual are not equivalent.
The first ICollection of objects to be considered
The second ICollection of objects to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that collection contains actual as an item.
ICollection of objects to be considered
Object to be found within collection
Asserts that collection contains actual as an item.
ICollection of objects to be considered
Object to be found within collection
The message that will be displayed on failure
Asserts that collection contains actual as an item.
ICollection of objects to be considered
Object to be found within collection
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that collection does not contain actual as an item.
ICollection of objects to be considered
Object that cannot exist within collection
Asserts that collection does not contain actual as an item.
ICollection of objects to be considered
Object that cannot exist within collection
The message that will be displayed on failure
Asserts that collection does not contain actual as an item.
ICollection of objects to be considered
Object that cannot exist within collection
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that superset is not a subject of subset.
The ICollection superset to be considered
The ICollection subset to be considered
Asserts that superset is not a subject of subset.
The ICollection superset to be considered
The ICollection subset to be considered
The message that will be displayed on failure
Asserts that superset is not a subject of subset.
The ICollection superset to be considered
The ICollection subset to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that superset is a subset of subset.
The ICollection superset to be considered
The ICollection subset to be considered
Asserts that superset is a subset of subset.
The ICollection superset to be considered
The ICollection subset to be considered
The message that will be displayed on failure
Asserts that superset is a subset of subset.
The ICollection superset to be considered
The ICollection subset to be considered
The message that will be displayed on failure
Arguments to be used in formatting the message
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Assert that an array,list or other collection is empty
An array, list or other collection implementing ICollection
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Arguments to be used in formatting the message
Assert that an array, list or other collection is empty
An array, list or other collection implementing ICollection
The message to be displayed on failure
Assert that an array,list or other collection is empty
An array, list or other collection implementing ICollection
NOTE: The use of asserters for extending NUnit has
now been replaced by the use of constraints. This
class is marked obsolete.
AbstractAsserter is the base class for all asserters.
Asserters encapsulate a condition test and generation
of an AssertionException with a tailored message. They
are used by the Assert class as helper objects.
User-defined asserters may be passed to the
Assert.DoAssert method in order to implement
extended asserts.
NOTE: The use of asserters for extending NUnit has
now been replaced by the use of constraints. This
interface is marked obsolete.
The interface implemented by an asserter. Asserters
encapsulate a condition test and generation of an
AssertionException with a tailored message. They
are used by the Assert class as helper objects.
User-defined asserters may be passed to the
Assert.DoAssert method in order to implement
extended asserts.
Test the condition for the assertion.
True if the test succeeds
Return the message giving the failure reason.
The return value is unspecified if no failure
has occured.
The user-defined message for this asserter.
Arguments to use in formatting the user-defined message.
Our failure message object, initialized as needed
Constructs an AbstractAsserter
The message issued upon failure
Arguments to be used in formatting the message
Test method to be implemented by derived types.
Default always succeeds.
True if the test succeeds
AssertionFailureMessage object used internally
Message related to a failure. If no failure has
occured, the result is unspecified.
The Assertion class is obsolete and has been
replaced by the Assert class.
Asserts that a condition is true. If it isn't it throws
an .
The message to display is the condition
is false
The evaluated condition
Asserts that a condition is true. If it isn't it throws
an .
The evaluated condition
/// Asserts that two doubles are equal concerning a delta. If the
expected value is infinity then the delta value is ignored.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
/// Asserts that two singles are equal concerning a delta. If the
expected value is infinity then the delta value is ignored.
The expected value
The actual value
The maximum acceptable difference between the
the expected and the actual
Asserts that two objects are equal. If they are not
an is thrown.
Asserts that two ints are equal. If they are not
an is thrown.
Asserts that two ints are equal. If they are not
an is thrown.
Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
Asserts that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. Numeric
types are compared via string comparision on their contents to
avoid problems comparing values between different types. All
non-numeric types are compared by using the Equals method.
If they are not equal an is thrown.
Asserts that an object isn't null.
Asserts that an object isn't null.
Asserts that an object is null.
Asserts that an object is null.
Asserts that two objects refer to the same object. If they
are not the same an is thrown.
Asserts that two objects refer to the same object.
If they are not an is thrown.
Fails a test with no message.
Fails a test with the given message.
Thrown when an assertion failed.
The error message that explains
the reason for the exception
The error message that explains
the reason for the exception
The exception that caused the
current exception
Serialization Constructor
AssertionFailureMessage encapsulates a failure message
issued as a result of an Assert failure.
Number of characters before a highlighted position before
clipping will occur. Clipped text is replaced with an
elipsis "..."
Number of characters after a highlighted position before
clipping will occur. Clipped text is replaced with an
elipsis "..."
Prefix used to start an expected value line.
Must be same length as actualPrefix.
Prefix used to start an actual value line.
Must be same length as expectedPrefix.
Construct an AssertionFailureMessage with a message
and optional arguments.
Construct an empty AssertionFailureMessage
Add an expected value line to the message containing
the text provided as an argument.
Text describing what was expected.
Add an actual value line to the message containing
the text provided as an argument.
Text describing the actual value.
Add an expected value line to the message containing
a string representation of the object provided.
An object representing the expected value
Add an expected value line to the message containing a double
and the tolerance used in making the comparison.
The expected value
The tolerance specified in the Assert
Add an actual value line to the message containing
a string representation of the object provided.
An object representing what was actually found
Display two lines that communicate the expected value, and the actual value
The expected value
The actual value found
Display two lines that communicate the expected value, the actual value and
the tolerance used in comparing two doubles.
The expected value
The actual value found
The tolerance specified in the Assert
Draws a marker under the expected/actual strings that highlights
where in the string a mismatch occurred.
The position of the mismatch
Reports whether the string lengths are the same or different, and
what the string lengths are.
The expected string
The actual string value
Called to create additional message lines when two objects have been
found to be unequal. If the inputs are strings, a special message is
rendered that can help track down where the strings are different,
based on differences in length, or differences in content.
If the inputs are not strings, the ToString method of the objects
is used to show what is different about them.
The expected value
The actual value
True if a case-insensitive comparison is being performed
Called to create additional message lines when two doubles have been
found to be unequal, within the specified tolerance.
Constructs a message that can be displayed when the content of two
strings are different, but the string lengths are the same. The
message will clip the strings to a reasonable length, centered
around the first position where they are mismatched, and draw
a line marking the position of the difference to make comparison
quicker.
The expected string value
The actual string value
True if a case-insensitive comparison is being performed
Display a standard message showing the differences found between
two arrays that were expected to be equal.
The expected array value
The actual array value
The index at which a difference was found
Display a standard message showing the differences found between
two collections that were expected to be equal.
The expected collection value
The actual collection value
The index at which a difference was found
Get an array of indices representing the point in a collection or
array corresponding to a single int index into the collection.
The collection to which the indices apply
Index in the collection
Array of indices
Displays elements from a list on a line
Text to prefix the line with
The list of items to display
The index in the list of the first element to display
The maximum number of elements to display
Formats an object for display in a message line
The object to be displayed
Tests two objects to determine if they are strings.
Renders up to M characters before, and up to N characters after
the specified index position. If leading or trailing text is
clipped, and elipses "..." is added where the missing text would
be.
Clips strings to limit previous or post newline characters,
since these mess up the comparison
Shows the position two strings start to differ. Comparison
starts at the start index.
-1 if no mismatch found, or the index where mismatch found
Turns CR, LF, or TAB into visual indicator to preserve visual marker
position. This is done by replacing the '\r' into '\\' and 'r'
characters, and the '\n' into '\\' and 'n' characters, and '\t' into
'\\' and 't' characters.
Thus the single character becomes two characters for display.
Attribute used to apply a category to a test
The name of the category
Construct attribute for a given category
The name of the category
Protected constructor uses the Type name as the name
of the category.
The name of the category
Abstract base for Attributes that are used to include tests
in the test run based on environmental settings.
Constructor with no included items specified, for use
with named property syntax.
Constructor taking one or more included items
Comma-delimited list of included items
Name of the item that is needed in order for
a test to run. Multiple itemss may be given,
separated by a comma.
Name of the item to be excluded. Multiple items
may be given, separated by a comma.
The reason for including or excluding the test
PlatformAttribute is used to mark a test fixture or an
individual method as applying to a particular platform only.
Constructor with no platforms specified, for use
with named property syntax.
Constructor taking one or more platforms
Comma-deliminted list of platforms
CultureAttribute is used to mark a test fixture or an
individual method as applying to a particular Culture only.
Constructor with no cultures specified, for use
with named property syntax.
Constructor taking one or more cultures
Comma-deliminted list of cultures
MessageWriter is the abstract base for classes that write
constraint descriptions and messages in some form. The
class has separate methods for writing various components
of a message, allowing implementations to tailor the
presentation as needed.
Construct a MessageWriter given a culture
Method to write single line message with optional args, usually
written to precede the general failure message.
The message to be written
Any arguments used in formatting the message
Method to write single line message with optional args, usually
written to precede the general failure message, at a givel
indentation level.
The indentation level of the message
The message to be written
Any arguments used in formatting the message
Display Expected and Actual lines for a constraint. This
is called by MessageWriter's default implementation of
WriteMessageTo and provides the generic two-line display.
The constraint that failed
Display Expected and Actual lines for given values. This
method may be called by constraints that need more control over
the display of actual and expected values than is provided
by the default implementation.
The expected value
The actual value causing the failure
Display Expected and Actual lines for given values, including
a tolerance value on the Expected line.
The expected value
The actual value causing the failure
The tolerance within which the test was made
Display the expected and actual string values on separate lines.
If the mismatch parameter is >=0, an additional line is displayed
line containing a caret that points to the mismatch point.
The expected string value
The actual string value
The point at which the strings don't match or -1
If true, case is ignored in locating the point where the strings differ
Writes the text for a connector.
The connector.
Writes the text for a predicate.
The predicate.
Writes the text for an expected value.
The expected value.
Writes the text for a modifier
The modifier.
Writes the text for an actual value.
The actual value.
Writes the text for a generalized value.
The value.
Writes the text for a collection value,
starting at a particular point, to a max length
The collection containing elements to write.
The starting point of the elements to write
The maximum number of elements to write
Abstract method to get the max line length
Summary description for SetCultureAttribute.
PropertyAttribute is used to attach information to a test as a name/value pair..
The property name
The property value
Construct a PropertyAttribute with a name and value
The name of the property
The property value
Constructor for use by inherited classes that use the
name of the type as the property name.
Gets the property name
Gets the property value
Construct given the name of a culture
TextMessageWriter writes constraint descriptions and messages
in displayable form as a text stream. It tailors the display
of individual message components to form the standard message
format of NUnit assertion failure messages.
Prefix used for the expected value line of a message
Prefix used for the actual value line of a message
Length of a message prefix
Construct a TextMessageWriter
Construct a TextMessageWriter, specifying a user message
and optional formatting arguments.
Method to write single line message with optional args, usually
written to precede the general failure message, at a givel
indentation level.
The indentation level of the message
The message to be written
Any arguments used in formatting the message
Display Expected and Actual lines for a constraint. This
is called by MessageWriter's default implementation of
WriteMessageTo and provides the generic two-line display.
The constraint that failed
Display Expected and Actual lines for given values. This
method may be called by constraints that need more control over
the display of actual and expected values than is provided
by the default implementation.
The expected value
The actual value causing the failure
Display Expected and Actual lines for given values, including
a tolerance value on the expected line.
The expected value
The actual value causing the failure
The tolerance within which the test was made
Display the expected and actual string values on separate lines.
If the mismatch parameter is >=0, an additional line is displayed
line containing a caret that points to the mismatch point.
The expected string value
The actual string value
The point at which the strings don't match or -1
If true, case is ignored in string comparisons
Writes the text for a connector.
The connector.
Writes the text for a predicate.
The predicate.
Write the text for a modifier.
The modifier.
Writes the text for an expected value.
The expected value.
Writes the text for an actual value.
The actual value.
Writes the text for a generalized value.
The value.
Writes the text for a collection value,
starting at a particular point, to a max length
The collection containing elements to write.
The starting point of the elements to write
The maximum number of elements to write
Write the generic 'Expected' line for a constraint
The constraint that failed
Write the generic 'Expected' line for a given value
The expected value
Write the generic 'Expected' line for a given value
and tolerance.
The expected value
The tolerance within which the test was made
Write the generic 'Actual' line for a constraint
The constraint for which the actual value is to be written
Write the generic 'Actual' line for a given value
The actual value causing a failure
Gets the maximum line length for this writer
Basic Asserts on strings.
The Equals method throws an AssertionException. This is done
to make sure there is no mistake by calling this function.
override the default ReferenceEquals to throw an AssertionException. This
implementation makes sure there is no mistake in calling this function
as part of Assert.
Asserts that a string is found within another string.
The expected string
The string to be examined
The message to display in case of failure
Arguments used in formatting the message
Asserts that a string is found within another string.
The expected string
The string to be examined
The message to display in case of failure
Asserts that a string is found within another string.
The expected string
The string to be examined
Asserts that a string starts with another string.
The expected string
The string to be examined
The message to display in case of failure
Arguments used in formatting the message
Asserts that a string starts with another string.
The expected string
The string to be examined
The message to display in case of failure
Asserts that a string starts with another string.
The expected string
The string to be examined
Asserts that a string ends with another string.
The expected string
The string to be examined
The message to display in case of failure
Arguments used in formatting the message
Asserts that a string ends with another string.
The expected string
The string to be examined
The message to display in case of failure
Asserts that a string ends with another string.
The expected string
The string to be examined
Asserts that two strings are equal, without regard to case.
The expected string
The actual string
The message to display in case of failure
Arguments used in formatting the message
Asserts that two strings are equal, without regard to case.
The expected string
The actual string
The message to display in case of failure
Asserts that two strings are equal, without regard to case.
The expected string
The actual string
Asserts that a string matches an expected regular expression pattern.
The expected expression
The actual string
The message to display in case of failure
Arguments used in formatting the message
Asserts that a string matches an expected regular expression pattern.
The expected expression
The actual string
The message to display in case of failure
Asserts that a string matches an expected regular expression pattern.
The expected expression
The actual string
Static methods used in creating messages
Returns the representation of a type as used in NUnitLite.
This is the same as Type.ToString() except for arrays,
which are displayed with their declared sizes.
Converts any control characters in a string
to their escaped representation.
The string to be converted
The converted string
Return the a string representation for a set of indices into an array
Array of indices for which a string is needed
Get an array of indices representing the point in a collection or
array corresponding to a single int index into the collection.
The collection to which the indices apply
Index in the collection
Array of indices
Clip a string around a particular point, returning the clipped
string with ellipses representing the removed parts
The string to be clipped
The maximum permitted length of the result string
The point around which clipping is to occur
The clipped string
Shows the position two strings start to differ. Comparison
starts at the start index.
The expected string
The actual string
The index in the strings at which comparison should start
Boolean indicating whether case should be ignored
-1 if no mismatch found, or the index where mismatch found
AssertionHelper is an optional base class for user tests,
allowing the use of shorter names for constraints and
asserts and avoiding conflict with the definition of
, from which it inherits much of its
behavior, in certain mock object frameworks.
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure. Works
identically to
A Constraint to be applied
The actual value to test
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure. Works
identically to
A Constraint to be applied
The actual value to test
The message that will be displayed on failure
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure. Works
identically to
A Constraint to be applied
The actual value to test
The message that will be displayed on failure
Arguments to be used in formatting the message
Asserts that a condition is true. If the condition is false the method throws
an . Works Identically to
.
The evaluated condition
The message to display if the condition is false
Arguments to be used in formatting the message
Asserts that a condition is true. If the condition is false the method throws
an . Works Identically to
.
The evaluated condition
The message to display if the condition is false
Asserts that a condition is true. If the condition is false the method throws
an . Works Identically to .
The evaluated condition
Returns a ListMapper based on a collection.
The original collection
Summary description for FileAssert.
The Equals method throws an AssertionException. This is done
to make sure there is no mistake by calling this function.
override the default ReferenceEquals to throw an AssertionException. This
implementation makes sure there is no mistake in calling this function
as part of Assert.
We don't actually want any instances of this object, but some people
like to inherit from it to add other static methods. Hence, the
protected constructor disallows any instances of this object.
Verifies that two Streams are equal. Two Streams are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The expected Stream
The actual Stream
The message to display if Streams are not equal
Arguments to be used in formatting the message
Verifies that two Streams are equal. Two Streams are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The expected Stream
The actual Stream
The message to display if objects are not equal
Verifies that two Streams are equal. Two Streams are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The expected Stream
The actual Stream
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
A file containing the value that is expected
A file containing the actual value
The message to display if Streams are not equal
Arguments to be used in formatting the message
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
A file containing the value that is expected
A file containing the actual value
The message to display if objects are not equal
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
A file containing the value that is expected
A file containing the actual value
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
The message to display if Streams are not equal
Arguments to be used in formatting the message
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
The message to display if objects are not equal
Verifies that two files are equal. Two files are considered
equal if both are null, or if both have the same value byte for byte.
If they are not equal an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
Asserts that two Streams are not equal. If they are equal
an is thrown.
The expected Stream
The actual Stream
The message to be displayed when the two Stream are the same.
Arguments to be used in formatting the message
Asserts that two Streams are not equal. If they are equal
an is thrown.
The expected Stream
The actual Stream
The message to be displayed when the Streams are the same.
Asserts that two Streams are not equal. If they are equal
an is thrown.
The expected Stream
The actual Stream
Asserts that two files are not equal. If they are equal
an is thrown.
A file containing the value that is expected
A file containing the actual value
The message to display if Streams are not equal
Arguments to be used in formatting the message
Asserts that two files are not equal. If they are equal
an is thrown.
A file containing the value that is expected
A file containing the actual value
The message to display if objects are not equal
Asserts that two files are not equal. If they are equal
an is thrown.
A file containing the value that is expected
A file containing the actual value
Asserts that two files are not equal. If they are equal
an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
The message to display if Streams are not equal
Arguments to be used in formatting the message
Asserts that two files are not equal. If they are equal
an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
The message to display if objects are not equal
Asserts that two files are not equal. If they are equal
an is thrown.
The path to a file containing the value that is expected
The path to a file containing the actual value
Thrown when an assertion failed.
The error message that explains
the reason for the exception
The exception that caused the
current exception
Serialization Constructor
Obsolete class, formerly used to identify tests through
inheritance. Avoid using this class for new tests.
Method called immediately before running the test.
Method Called immediately after running the test. It is
guaranteed to be called, even if an exception is thrown.
Attribute used to mark a class that contains one-time SetUp
and/or TearDown methods that apply to all the tests in a
namespace or an assembly.
SetUpFixtureAttribute is used to identify a SetUpFixture
Attribute used to mark a static (shared in VB) property
that returns a list of tests.
Attribute used to identify a method that is called
immediately after each test is run. The method is
guaranteed to be called, even if an exception is thrown.
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.
[TestFixture]
public class Fixture
{
[Test]
public void MethodToTest()
{}
[Test(Description = "more detailed description")]
publc void TestDescriptionMethod()
{}
}
Descriptive text for this test
[TestFixture]
public class ExampleClass
{}
Descriptive text for this fixture
Attribute used to identify a method that is
called before any tests in a fixture are run.
Attribute used to identify a method that is called after
all the tests in a fixture have run. The method is
guaranteed to be called, even if an exception is thrown.
Attribute used to mark a test that is to be ignored.
Ignored tests result in a warning message when the
tests are run.
Constructs the attribute without giving a reason
for ignoring the test.
Constructs the attribute giving a reason for ignoring the test
The reason for ignoring the test
The reason for ignoring a test
ExplicitAttribute marks a test or test fixture so that it will
only be run if explicitly executed from the gui or command line
or if it is included by use of a filter. The test will not be
run simply because an enclosing suite is run.
Default constructor
Constructor with a reason
The reason test is marked explicit
The reason test is marked explicit
Attribute used to provide descriptive text about a
test case or fixture.
Construct the attribute
Text describing the test
Gets the test description
Interface implemented by a user fixture in order to
validate any expected exceptions. It is only called
for test methods marked with the ExpectedException
attribute.
Method to handle an expected exception
The exception to be handled