Class SameAsConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
SameAsConstraint tests whether an object is identical to the object passed to its constructor
public class SameAsConstraint : Constraint, IConstraint, IResolveConstraint
- Inheritance
-
SameAsConstraint
- Implements
- Inherited Members
Constructors
SameAsConstraint(object)
Initializes a new instance of the SameAsConstraint class.
public SameAsConstraint(object expected)
Parameters
expectedobjectThe expected object.
Properties
Description
The Description of what this constraint tests, for use in messages and in the ConstraintResult.
public override string Description { get; }
Property Value
Methods
ApplyTo<TActual>(TActual)
Test whether the constraint is satisfied by a given value
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
actualTActualThe value to be tested
Returns
- ConstraintResult
True for success, false for failure
Type Parameters
TActual