Method That
That(bool, string)
Ensures that an assertion is true.
public static void That(bool assertion, string message)
Parameters
assertion
boolThe assertion.
message
stringThe message to use with the exception that is thrown if the assertion is false.
That(bool, string, string)
Ensures that an assertion is true.
public static void That(bool assertion, string message, string paramName)
Parameters
assertion
boolThe assertion.
message
stringThe message to use with the exception that is thrown if the assertion is false.
paramName
stringThe parameter name.
That<T>(T, Func<T, bool>, string, string)
Ensures that the value of a parameter meets an assertion.
public static T That<T>(T value, Func<T, bool> assertion, string paramName, string message)
Parameters
value
TThe value of the parameter.
assertion
Func<T, bool>The assertion.
paramName
stringThe name of the parameter.
message
stringThe message to use with the exception that is thrown if the assertion is false.
Returns
- T
The value of the parameter.
Type Parameters
T
Type type of the value.