Table of Contents

Class ExactTypeConstraint

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

ExactTypeConstraint is used to test that an object is of the exact type provided in the constructor

public class ExactTypeConstraint : TypeConstraint, IConstraint, IResolveConstraint
Inheritance
ExactTypeConstraint
Implements
Derived
Inherited Members

Constructors

ExactTypeConstraint(Type)

Construct an ExactTypeConstraint for a given Type

public ExactTypeConstraint(Type type)

Parameters

type Type

The expected Type.

Methods

Matches(object)

Apply the constraint to an actual value, returning true if it succeeds

protected override bool Matches(object actual)

Parameters

actual object

The actual argument

Returns

bool

True if the constraint succeeds, otherwise false.