Class AssignableFromConstraint
AssignableFromConstraint is used to test that an object can be assigned from a given Type.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class AssignableFromConstraint : TypeConstraint, IConstraint, IResolveConstraint
Constructors
View SourceAssignableFromConstraint(Type)
Construct an AssignableFromConstraint for the type provided
Declaration
public AssignableFromConstraint(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Methods
View SourceMatches(object?)
Apply the constraint to an actual value, returning true if it succeeds
Declaration
protected override bool Matches(object? actual)
Parameters
Type | Name | Description |
---|---|---|
object | actual | The actual argument |
Returns
Type | Description |
---|---|
bool | True if the constraint succeeds, otherwise false. |