Table of Contents

Class Assert

Namespace
Dassie.Core
Assembly
Dassie.Core.dll

Implements global assertion functions.

public static class Assert
Inheritance
Assert
Inherited Members

Methods

assert(bool)

Checks for a condition; if the condition is false, throws a runtime exception.

public static void assert(bool condition)

Parameters

condition bool

The condition to check.

Exceptions

Assert.AssertionException

assert(bool, string)

Checks for a condition; if the condition is false, throws a runtime exception with the specified message.

public static void assert(bool condition, string message)

Parameters

condition bool

The condition to check.

message string

The message to display on failure.

Exceptions

Assert.AssertionException

assertEqual(object, object)

Checks wheter its two arguments are equal. If they are not, throws a runtime exception.

public static void assertEqual(object obj1, object obj2)

Parameters

obj1 object
obj2 object

Exceptions

Assert.AssertionException