AssertionHelper
AssertionHelper is an optional base class for user tests,
allowing the use of shorter names in making asserts.
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if all of them succeed.
Returns a constraint that tests whether an object graph is serializable in binary format.
Returns a new ConstraintExpression, which will apply the following
constraint to the Count property of the object being tested.
Returns a constraint that tests for empty
Returns a constraint that tests for False
Returns a new ConstraintExpression, which will apply the following
constraint to the InnerException property of the object being tested.
Returns a new ConstraintExpression, which will apply the following
constraint to the Length property of the object being tested.
Returns a new ConstraintExpression, which will apply the following
constraint to the Message property of the object being tested.
Returns a constraint that tests for NaN
Returns a constraint that tests for a negative value
Returns a ConstraintExpression that negates any
following constraint.
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if all of them fail.
Returns a ConstraintExpression that negates any
following constraint.
Returns a constraint that tests for null
Returns a constraint that tests whether a collection is ordered
Returns a constraint that tests for a positive value
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if at least one of them succeeds.
Returns a constraint that tests for True
Returns a constraint that tests whether a collection
contains all unique items.
Returns a constraint that tests whether an object graph is serializable in XML format.
Returns a constraint that tests for equality with zero
public AssertionHelper()
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding only if a specified number of them succeed.
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure.
public static void Expect<TActual>(TActual actual, IResolveConstraint expression, string message, object[] args)
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the
actual value is greater than or equal to the supplied argument
Returns a constraint that tests whether the
actual value is less than or equal to the supplied argument
Returns a new AttributeConstraint checking for the
presence of a particular attribute on an object.
Returns a new AttributeConstraint checking for the
presence of a particular attribute on an object.
Returns a new SomeItemsConstraint checking for the
presence of a particular object in the collection.
Returns a new ContainsConstraint. This constraint
will, in turn, make use of the appropriate second-level
constraint, depending on the type of the actual argument.
This overload is only used if the item sought is a string,
since any other type implies that we are looking for a
collection member.
Returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
Returns a constraint that fails if the actual
value contains the substring supplied as an argument.
Returns a constraint that fails if the actual
value ends with the substring supplied as an argument.
Returns a constraint that fails if the actual
value matches the pattern supplied as an argument.
Returns a constraint that fails if the actual
value starts with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that tests two items for equality
Returns a constraint that tests whether the actual value
is a collection containing the same elements as the
collection supplied as an argument.
Asserts that a condition is true. If the condition is false the method throws
an AssertionException. Works Identically to
That.
Asserts that a condition is true. If the condition is false the method throws
an AssertionException. Works Identically to That.
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure.
public void Expect<TActual>(ActualValueDelegate<TActual> del, IResolveConstraint expr, string message, object[] args)
Apply a constraint to an actual value, succeeding if the constraint
is satisfied and throwing an assertion exception on failure.
Asserts that the code represented by a delegate throws an exception
that satisfies the constraint provided.
Returns a constraint that tests whether the
actual value is greater than the supplied argument
Returns a constraint that tests whether the
actual value is greater than or equal to the supplied argument
Returns a constraint that tests whether the actual value falls
within a specified range.
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Returns a constraint that tests whether the
actual value is less than the supplied argument
Returns a constraint that tests whether the
actual value is less than or equal to the supplied argument
Returns a ListMapper based on a collection.
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns a new SomeItemsConstraint checking for the
presence of a particular object in the collection.
Returns a new PropertyConstraintExpression, which will either
test for the existence of the named property on the object
being tested or apply any following constraint to that property.
Returns a constraint that tests that two references are the same object
Returns a constraint that tests whether the path provided
is the same as an expected path after canonicalization.
Returns a constraint that tests whether the path provided
is the same path or under an expected path after canonicalization.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that tests whether the path provided
is a subpath of the expected path after canonicalization.
Returns a constraint that tests whether the actual value
is a subset of the collection supplied as an argument.
Returns a constraint that tests whether the actual value
is a superset of the collection supplied as an argument.
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.