Table of Contents

Class Assert

Namespace
NetTopologySuite.Utilities
Assembly
NetTopologySuite.dll

A utility for making programming assertions.

public static class Assert
Inheritance
Assert
Inherited Members

Methods

IsEquals(object, object)

Tests if two values are equal.

If the test fails, AssertionFailedException with no specific message is thrown.
public static void IsEquals(object expectedValue, object actualValue)

Parameters

expectedValue object

The expected value

actualValue object

The actual value

IsEquals(object, object, string)

Tests if two values are equal.

If the test fails, AssertionFailedException with message is thrown.
public static void IsEquals(object expectedValue, object actualValue, string message)

Parameters

expectedValue object

The expected value

actualValue object

The actual value

message string

A message describing the failure condition.

IsTrue(bool)

Tests if assertion is true

If the test fails, AssertionFailedException with no message is thrown.
public static void IsTrue(bool assertion)

Parameters

assertion bool

The assertion value

IsTrue(bool, string)

Tests if assertion is true

If the test fails, AssertionFailedException with message is thrown.
public static void IsTrue(bool assertion, string message)

Parameters

assertion bool

The assertion value

message string

A message describing the failure condition.

ShouldNeverReachHere()

Throws an AssertionFailedException with no specific message text.

public static void ShouldNeverReachHere()

ShouldNeverReachHere(string)

Throws an AssertionFailedException with message as specific message text.

public static void ShouldNeverReachHere(string message)

Parameters

message string

A text describing the failure condition