Summary
Interface implemented by all constraints
- Namespace
- TCLite
.Constraints - Implementing Types
-
- EndsWithConstraint
- ExactCountConstraint
- AndConstraint
- PropertyConstraint
- Throws
Nothing Constraint - FalseConstraint
- SubstringConstraint
- ComparisonConstraint
<TExpected> - NotConstraint
- NullConstraint
- Unique
Items Constraint - PrefixConstraint
- Expected
Value Constraint <TExpected> - Property
Exists Constraint - StringConstraint
- Empty
Collection Constraint - Throws
Exception Constraint - Instance
Of Type Constraint - Empty
String Constraint - EmptyConstraint
- NoItemConstraint
- Less
Than Or Equal Constraint <TExpected> - ThrowsConstraint
- BinaryConstraint
- Constraint
- TypeConstraint
- Collection
Equivalent Constraint - RangeConstraint
<TExpected> - SomeItemsConstraint
- AllItemsConstraint
- SameAsConstraint
<TExpected> - Collection
Items Equal Constraint - Greater
Than Constraint <TExpected> - ContainsConstraint
<TExpected> - OrConstraint
- ConditionConstraint
<TActual> - CollectionConstraint
- LessThanConstraint
<TExpected> - RegexConstraint
- ExactTypeConstraint
- TrueConstraint
- EqualConstraint
<TExpected> - Greater
Than Or Equal Constraint <TExpected> - StartsWithConstraint
- Exception
Type Constraint
graph BT
Type["IConstraint"]
class Type type-node
Implementing0["EndsWithConstraint"]-.->Type
click Implementing0 "/tc-lite/api/TCLite.Constraints/EndsWithConstraint"
Implementing1["ExactCountConstraint"]-.->Type
click Implementing1 "/tc-lite/api/TCLite.Constraints/ExactCountConstraint"
Implementing2["AndConstraint"]-.->Type
click Implementing2 "/tc-lite/api/TCLite.Constraints/AndConstraint"
Implementing3["PropertyConstraint"]-.->Type
click Implementing3 "/tc-lite/api/TCLite.Constraints/PropertyConstraint"
Implementing4["ThrowsNothingConstraint"]-.->Type
click Implementing4 "/tc-lite/api/TCLite.Constraints/ThrowsNothingConstraint"
Implementing5["FalseConstraint"]-.->Type
click Implementing5 "/tc-lite/api/TCLite.Constraints/FalseConstraint"
Implementing6["SubstringConstraint"]-.->Type
click Implementing6 "/tc-lite/api/TCLite.Constraints/SubstringConstraint"
Implementing7["ComparisonConstraint<TExpected>"]-.->Type
click Implementing7 "/tc-lite/api/TCLite.Constraints/ComparisonConstraint_1"
Implementing8["NotConstraint"]-.->Type
click Implementing8 "/tc-lite/api/TCLite.Constraints/NotConstraint"
Implementing9["NullConstraint"]-.->Type
click Implementing9 "/tc-lite/api/TCLite.Constraints/NullConstraint"
Implementing10["UniqueItemsConstraint"]-.->Type
click Implementing10 "/tc-lite/api/TCLite.Constraints/UniqueItemsConstraint"
Implementing11["PrefixConstraint"]-.->Type
click Implementing11 "/tc-lite/api/TCLite.Constraints/PrefixConstraint"
Implementing12["ExpectedValueConstraint<TExpected>"]-.->Type
click Implementing12 "/tc-lite/api/TCLite.Constraints/ExpectedValueConstraint_1"
Implementing13["PropertyExistsConstraint"]-.->Type
click Implementing13 "/tc-lite/api/TCLite.Constraints/PropertyExistsConstraint"
Implementing14["StringConstraint"]-.->Type
click Implementing14 "/tc-lite/api/TCLite.Constraints/StringConstraint"
Implementing15["EmptyCollectionConstraint"]-.->Type
click Implementing15 "/tc-lite/api/TCLite.Constraints/EmptyCollectionConstraint"
Implementing16["ThrowsExceptionConstraint"]-.->Type
click Implementing16 "/tc-lite/api/TCLite.Constraints/ThrowsExceptionConstraint"
Implementing17["InstanceOfTypeConstraint"]-.->Type
click Implementing17 "/tc-lite/api/TCLite.Constraints/InstanceOfTypeConstraint"
Implementing18["EmptyStringConstraint"]-.->Type
click Implementing18 "/tc-lite/api/TCLite.Constraints/EmptyStringConstraint"
Implementing19["EmptyConstraint"]-.->Type
click Implementing19 "/tc-lite/api/TCLite.Constraints/EmptyConstraint"
Implementing20["NoItemConstraint"]-.->Type
click Implementing20 "/tc-lite/api/TCLite.Constraints/NoItemConstraint"
Implementing21["LessThanOrEqualConstraint<TExpected>"]-.->Type
click Implementing21 "/tc-lite/api/TCLite.Constraints/LessThanOrEqualConstraint_1"
Implementing22["ThrowsConstraint"]-.->Type
click Implementing22 "/tc-lite/api/TCLite.Constraints/ThrowsConstraint"
Implementing23["BinaryConstraint"]-.->Type
click Implementing23 "/tc-lite/api/TCLite.Constraints/BinaryConstraint"
Implementing24["Constraint"]-.->Type
click Implementing24 "/tc-lite/api/TCLite.Constraints/Constraint"
Implementing25["TypeConstraint"]-.->Type
click Implementing25 "/tc-lite/api/TCLite.Constraints/TypeConstraint"
Implementing26["CollectionEquivalentConstraint"]-.->Type
click Implementing26 "/tc-lite/api/TCLite.Constraints/CollectionEquivalentConstraint"
Implementing27["RangeConstraint<TExpected>"]-.->Type
click Implementing27 "/tc-lite/api/TCLite.Constraints/RangeConstraint_1"
Implementing28["SomeItemsConstraint"]-.->Type
click Implementing28 "/tc-lite/api/TCLite.Constraints/SomeItemsConstraint"
Implementing29["AllItemsConstraint"]-.->Type
click Implementing29 "/tc-lite/api/TCLite.Constraints/AllItemsConstraint"
Implementing30["SameAsConstraint<TExpected>"]-.->Type
click Implementing30 "/tc-lite/api/TCLite.Constraints/SameAsConstraint_1"
Implementing31["CollectionItemsEqualConstraint"]-.->Type
click Implementing31 "/tc-lite/api/TCLite.Constraints/CollectionItemsEqualConstraint"
Implementing32["GreaterThanConstraint<TExpected>"]-.->Type
click Implementing32 "/tc-lite/api/TCLite.Constraints/GreaterThanConstraint_1"
Implementing33["ContainsConstraint<TExpected>"]-.->Type
click Implementing33 "/tc-lite/api/TCLite.Constraints/ContainsConstraint_1"
Implementing34["OrConstraint"]-.->Type
click Implementing34 "/tc-lite/api/TCLite.Constraints/OrConstraint"
Implementing35["ConditionConstraint<TActual>"]-.->Type
click Implementing35 "/tc-lite/api/TCLite.Constraints/ConditionConstraint_1"
Implementing36["CollectionConstraint"]-.->Type
click Implementing36 "/tc-lite/api/TCLite.Constraints/CollectionConstraint"
Implementing37["LessThanConstraint<TExpected>"]-.->Type
click Implementing37 "/tc-lite/api/TCLite.Constraints/LessThanConstraint_1"
Implementing38["RegexConstraint"]-.->Type
click Implementing38 "/tc-lite/api/TCLite.Constraints/RegexConstraint"
Implementing39["ExactTypeConstraint"]-.->Type
click Implementing39 "/tc-lite/api/TCLite.Constraints/ExactTypeConstraint"
Implementing40["TrueConstraint"]-.->Type
click Implementing40 "/tc-lite/api/TCLite.Constraints/TrueConstraint"
Implementing41["EqualConstraint<TExpected>"]-.->Type
click Implementing41 "/tc-lite/api/TCLite.Constraints/EqualConstraint_1"
Implementing42["GreaterThanOrEqualConstraint<TExpected>"]-.->Type
click Implementing42 "/tc-lite/api/TCLite.Constraints/GreaterThanOrEqualConstraint_1"
Implementing43["StartsWithConstraint"]-.->Type
click Implementing43 "/tc-lite/api/TCLite.Constraints/StartsWithConstraint"
Implementing44["ExceptionTypeConstraint"]-.->Type
click Implementing44 "/tc-lite/api/TCLite.Constraints/ExceptionTypeConstraint"
Syntax
public interface IConstraint
Properties
Name | Value | Summary |
---|---|---|
Arguments | object[] |
Arguments provided to this Constraint, for use in
formatting the description.
|
Builder | ConstraintBuilder |
The ConstraintBuilder holding this constraint
|
Description | string |
The Description of what this constraint tests, for
use in messages and in the ConstraintResult.
|
DisplayName | string |
The display name of this Constraint for use by ToString().
|
Methods
Name | Value | Summary |
---|---|---|
ApplyTo |
ConstraintResult |
Applies the constraint to an ActualValueDelegate that returns
the value to be tested. The default implementation simply evaluates
the delegate but derived classes may override it to provide for
delayed processing.
|
ApplyTo |
ConstraintResult |
Applies the constraint to an actual value, returning a ConstraintResult.
|
ApplyTo |
ConstraintResult |
Test whether the constraint is satisfied by a given reference.
The default implementation simply dereferences the value but
derived classes may override it to provide for delayed processing.
|
ValidateActualValue |
void |
Validate the actual value argument based on what the
particular constraint allows.virtual The default
implementation does nothing, implying that the constraint
can handle any Type as well as null values.
|