AssertionChain Class Methods
In This Topic
For a list of all members of this type, see AssertionChain members .
Public Methods
Name Description
AddReportable Overloaded.
Adds some information to the assertion that will be included in the message
that is emitted if an assertion fails.
BecauseOf Overloaded.
Adds an explanation of why the assertion is supposed to succeed to the scope.
FailWith Overloaded. Evaluates the ForCondition , and, if false , raises the appropriate exception specific for the detected test framework.
ForCondition Sets the boolean condition that determines if the assertion succeeds or not.
ForConstraint
GetOrCreate Either starts a new assertion chain, or, when ReuseOnce was called, for once, will return an existing instance.
Given<T>
OverrideCallerIdentifier
Allows overriding the caller identifier for the next call to one of the `FailWith` overloads instead
of relying on the automatic behavior that extracts the variable names from the C# code.
ReuseOnce Ensures that the next call to GetOrCreate will reuse the current instance.
WithCallerPostfix Adds a postfix such as [0] to the caller identifier detected by the library.
WithDefaultIdentifier
WithExpectation Overloaded. Sets an expectation message that will be reused by nested assertions in the specified System.Action function.
WithReportable Fluent alternative for AddReportable(String,String)
Top
Extension Methods
See Also
2025 © Xceed Software Inc.
4170 Grande-Allée, Suite 100, Greenfield Park, Qc J4V 3N2