Table of Contents

Class AssignableFromConstraint

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

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

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

Constructors

AssignableFromConstraint(Type)

Construct an AssignableFromConstraint for the type provided

public AssignableFromConstraint(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.