AssignableFromConstraint is used to test that an object can be assigned from a given Type.
More...
|
static Constraint | operator& (Constraint left, Constraint right) |
| This operator creates a constraint that is satisfied only if both argument constraints are satisfied. More...
|
|
static Constraint | operator| (Constraint left, Constraint right) |
| This operator creates a constraint that is satisfied if either of the argument constraints is satisfied. More...
|
|
static Constraint | operator! (Constraint constraint) |
| This operator creates a constraint that is satisfied if the argument constraint is not satisfied. More...
|
|
Type | expectedType |
| The expected Type used by the constraint More...
|
|
Type | actualType |
| The type of the actual argument to which the constraint was applied More...
|
|
string | DisplayName [get, protected set] |
| The display name of this Constraint for use by ToString(). The default value is the name of the constraint with trailing "Constraint" removed. Derived classes may set this to another name in their constructors. More...
|
|
virtual string | Description [get, protected set] |
| The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
|
|
object[] | Arguments [get, private set] |
| Arguments provided to this Constraint, for use in formatting the description. More...
|
|
ConstraintBuilder | Builder [get, set] |
| The ConstraintBuilder holding this constraint More...
|
|
ConstraintExpression | And [get] |
| Returns a ConstraintExpression by appending And to the current constraint. More...
|
|
ConstraintExpression | With [get] |
| Returns a ConstraintExpression by appending And to the current constraint. More...
|
|
ConstraintExpression | Or [get] |
| Returns a ConstraintExpression by appending Or to the current constraint. More...
|
|
string | DisplayName [get] |
| The display name of this Constraint for use by ToString(). More...
|
|
string | Description [get] |
| The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
|
|
object[] | Arguments [get] |
| Arguments provided to this Constraint, for use in formatting the description. More...
|
|
ConstraintBuilder | Builder [get, set] |
| The ConstraintBuilder holding this constraint More...
|
|
AssignableFromConstraint is used to test that an object can be assigned from a given Type.
NUnit.Framework.Constraints.AssignableFromConstraint.AssignableFromConstraint |
( |
Type |
type | ) |
|
|
inline |
override bool NUnit.Framework.Constraints.AssignableFromConstraint.Matches |
( |
object |
actual | ) |
|
|
inlineprotectedvirtual |
Apply the constraint to an actual value, returning true if it succeeds
- Parameters
-
actual | The actual argument |
- Returns
- True if the constraint succeeds, otherwise false.
Implements NUnit.Framework.Constraints.TypeConstraint.
The documentation for this class was generated from the following file: