Method That
That(bool, string)
Ensures that an assertion is true.
public static void That(bool assertion, string message)
Parameters
assertionboolThe assertion.
messagestringThe 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
assertionboolThe assertion.
messagestringThe message to use with the exception that is thrown if the assertion is false.
paramNamestringThe 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
valueTThe value of the parameter.
assertionFunc<T, bool>The assertion.
paramNamestringThe name of the parameter.
messagestringThe message to use with the exception that is thrown if the assertion is false.
Returns
- T
The value of the parameter.
Type Parameters
TType type of the value.