Class InstanceOfTypeConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
InstanceOfTypeConstraint is used to test that an object is of the same type provided or derived from it.
public class InstanceOfTypeConstraint : TypeConstraint, IConstraint, IResolveConstraint
- Inheritance
-
InstanceOfTypeConstraint
- Implements
- Inherited Members
Constructors
InstanceOfTypeConstraint(Type)
Construct an InstanceOfTypeConstraint for the type provided
public InstanceOfTypeConstraint(Type type)
Parameters
type
TypeThe 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
objectThe actual argument
Returns
- bool
True if the constraint succeeds, otherwise false.