Is Is Class

Definition

Helper class with properties and methods that supply a number of constraints used in Asserts.

public class Is
type Is = class
Inheritance
Derived

Constructors

Is() Is()

Properties

All All

Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding if all of them succeed.

BinarySerializable BinarySerializable

Returns a constraint that tests whether an object graph is serializable in binary format.

Empty Empty

Returns a constraint that tests for empty

False False

Returns a constraint that tests for False

NaN NaN

Returns a constraint that tests for NaN

Negative Negative
Not Not

Returns a ConstraintExpression that negates any following constraint.

Null Null

Returns a constraint that tests for null

Ordered Ordered

Returns a constraint that tests whether a collection is ordered

Positive Positive
True True

Returns a constraint that tests for True

Unique Unique

Returns a constraint that tests whether a collection contains all unique items.

XmlSerializable XmlSerializable

Returns a constraint that tests whether an object graph is serializable in xml format.

Methods

AssignableFrom(Type) AssignableFrom(Type)

Returns a constraint that tests whether the actual value is assignable from the type supplied as an argument.

AssignableFrom<T>() AssignableFrom<T>()

Returns a constraint that tests whether the actual value is assignable from the type supplied as an argument.

AssignableTo(Type) AssignableTo(Type)

Returns a constraint that tests whether the actual value is assignable from the type supplied as an argument.

AssignableTo<T>() AssignableTo<T>()

Returns a constraint that tests whether the actual value is assignable from the type supplied as an argument.

AtLeast(Object) AtLeast(Object)

Returns a constraint that tests whether the actual value is greater than or equal to the suppled argument

AtMost(Object) AtMost(Object)

Returns a constraint that tests whether the actual value is less than or equal to the suppled argument

EqualTo(Object) EqualTo(Object)

Returns a constraint that tests two items for equality

EquivalentTo(IEnumerable) EquivalentTo(IEnumerable)

Returns a constraint that tests whether the actual value is a collection containing the same elements as the collection supplied as an argument.

GreaterThan(Object) GreaterThan(Object)

Returns a constraint that tests whether the actual value is greater than the suppled argument

GreaterThanOrEqualTo(Object) GreaterThanOrEqualTo(Object)

Returns a constraint that tests whether the actual value is greater than or equal to the suppled argument

InRange<T>(T, T) InRange<T>(T, T)
InstanceOf(Type) InstanceOf(Type)

Returns a constraint that tests whether the actual value is of the type supplied as an argument or a derived type.

InstanceOf<T>() InstanceOf<T>()

Returns a constraint that tests whether the actual value is of the type supplied as an argument or a derived type.

LessThan(Object) LessThan(Object)

Returns a constraint that tests whether the actual value is less than the suppled argument

LessThanOrEqualTo(Object) LessThanOrEqualTo(Object)

Returns a constraint that tests whether the actual value is less than or equal to the suppled argument

SameAs(Object) SameAs(Object)

Returns a constraint that tests that two references are the same object

SamePath(String) SamePath(String)

Returns a constraint that tests whether the path provided is the same as an expected path after canonicalization.

SamePathOrUnder(String) SamePathOrUnder(String)

Returns a constraint that tests whether the path provided is the same path or under an expected path after canonicalization.

StringContaining(String) StringContaining(String)

Returns a constraint that succeeds if the actual value contains the substring supplied as an argument.

StringEnding(String) StringEnding(String)

Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument.

StringMatching(String) StringMatching(String)

Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.

StringStarting(String) StringStarting(String)

Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument.

SubPath(String) SubPath(String)
SubsetOf(IEnumerable) SubsetOf(IEnumerable)

Returns a constraint that tests whether the actual value is a subset of the collection supplied as an argument.

TypeOf(Type) TypeOf(Type)

Returns a constraint that tests whether the actual value is of the exact type supplied as an argument.

TypeOf<T>() TypeOf<T>()

Returns a constraint that tests whether the actual value is of the exact type supplied as an argument.

Applies to