class
Assert
public static abstract sealed class Assert Methods
static Void NotNull(T obj, String message) Throws an exception when the given object is null.
obj — Object to test message — Message to show when object is null Exception — Thrown when the given object is null. static Void NotNull(T obj) Throws an exception when the given object is null.
obj — Object to test Exception — Thrown when the given object is null. static Void IsNull(T obj, String message) Throws an exception when the given object is not null.
obj — Object to test message — Message to show when null Exception — Thrown when the given object is null. static Void IsNull(T obj) Throws an exception when the given object is not null.
obj — Object to test Exception — Thrown when the given object is null. static Void IsValid(IValid obj) Throws an exception when the given object is not valid.
static Void AreEqual(T a, T b, String message = null) Throws an exception when the 2 given objects are not equal to each other.
a — Object A to test. b — Object B to test. message — Message to include in the exception, if any. Exception — Thrown when 2 given objects are not equal static Void AreNotEqual(T a, T b, String message = null) Throws an exception when the 2 given objects are equal to each other.
static Void True(Boolean isValid, String message = null) Throws an exception when given expression does not resolve to true.
isValid — The expression to test message — Message to include in the exception, if any. Exception — Thrown when given expression is not true. static Void False(Boolean isValid, String message = null) Throws an exception when given expression does not resolve to false.
isValid — The expression to test message — Message to include in the exception, if any. Exception — Thrown when given expression is not false.