API ReferenceSandbox.Diagnostics

Assertclass

objectAssert
Namespace
Sandbox.Diagnostics
Assembly
Sandbox.System
Declaration
public static abstract sealed class Sandbox.Diagnostics.Assert

Methods9

Showing 9 methods

public static void AreEqual(T a, T b, string message = null)PUBLICSTATIC

Throws an exception when the 2 given objects are not equal to each other.

ParameterTypeDescription
aTObject A to test.
bTObject B to test.
message = nullstringMessage to include in the exception, if any.
Returns:void

Exceptions

ExceptionCondition
ExceptionThrown when 2 given objects are not equal

public static void AreNotEqual(T a, T b, string message = null)PUBLICSTATIC

Throws an exception when the 2 given objects are equal to each other.

ParameterTypeDescription
aT
bT
message = nullstring
Returns:void

public static void False(bool isValid, string message = null)PUBLICSTATIC

Throws an exception when given expression does not resolve to false.

ParameterTypeDescription
isValidboolThe expression to test
message = nullstringMessage to include in the exception, if any.
Returns:void

Exceptions

ExceptionCondition
ExceptionThrown when given expression is not false.

public static void IsValid(Sandbox.IValid obj)PUBLICSTATIC

Throws an exception when the given object is not valid.

ParameterTypeDescription
objIValid
Returns:void

public static void True(bool isValid, string message = null)PUBLICSTATIC

Throws an exception when given expression does not resolve to true.

ParameterTypeDescription
isValidboolThe expression to test
message = nullstringMessage to include in the exception, if any.
Returns:void

Exceptions

ExceptionCondition
ExceptionThrown when given expression is not true.

On this page