Table of Contents

Class AssignableToConstraint

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

AssignableToConstraint is used to test that an object can be assigned to a given Type.

public class AssignableToConstraint : TypeConstraint, IConstraint, IResolveConstraint
Inheritance
AssignableToConstraint
Implements
Inherited Members

Constructors

AssignableToConstraint(Type)

Construct an AssignableToConstraint for the type provided

public AssignableToConstraint(Type type)

Parameters

type 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.