API ReferenceSandbox.Diagnostics
Assertclass
object→Assert
Methods9
Showing 9 methods
public static void AreEqual(T a, T b, string message = null)
Throws an exception when the 2 given objects are not equal to each other.
| Parameter | Type | Description |
|---|---|---|
| a | T | Object A to test. |
| b | T | Object B to test. |
| message = null | string | Message to include in the exception, if any. |
Returns:
void—Exceptions
| Exception | Condition |
|---|---|
Exception | Thrown when 2 given objects are not equal |
public static void AreNotEqual(T a, T b, string message = null)
Throws an exception when the 2 given objects are equal to each other.
| Parameter | Type | Description |
|---|---|---|
| a | T | — |
| b | T | — |
| message = null | string | — |
Returns:
void—public static void False(bool isValid, string message = null)
Throws an exception when given expression does not resolve to false.
| Parameter | Type | Description |
|---|---|---|
| isValid | bool | The expression to test |
| message = null | string | Message to include in the exception, if any. |
Returns:
void—Exceptions
| Exception | Condition |
|---|---|
Exception | Thrown when given expression is not false. |
public static void IsValid(Sandbox.IValid obj)
Throws an exception when the given object is not valid.
| Parameter | Type | Description |
|---|---|---|
| obj | IValid | — |
Returns:
void—public static void True(bool isValid, string message = null)
Throws an exception when given expression does not resolve to true.
| Parameter | Type | Description |
|---|---|---|
| isValid | bool | The expression to test |
| message = null | string | Message to include in the exception, if any. |
Returns:
void—Exceptions
| Exception | Condition |
|---|---|
Exception | Thrown when given expression is not true. |
No results match this filter.