Class Assert
A utility for making programming assertions.
Inherited Members
Namespace: NetTopologySuite.Utilities
Assembly: NetTopologySuite.dll
Syntax
public static class Assert
Methods
| Improve this Doc View SourceIsEquals(Object, Object)
Tests if two values are equal.
If the test fails, AssertionFailedException with no specific message is thrown.
Declaration
public static void IsEquals(object expectedValue, object actualValue)
Parameters
Type | Name | Description |
---|---|---|
Object | expectedValue | The expected value |
Object | actualValue | The actual value |
IsEquals(Object, Object, String)
Tests if two values are equal.
If the test fails, AssertionFailedException with message
is thrown.
Declaration
public static void IsEquals(object expectedValue, object actualValue, string message)
Parameters
Type | Name | Description |
---|---|---|
Object | expectedValue | The expected value |
Object | actualValue | The actual value |
String | message | A message describing the failure condition. |
IsTrue(Boolean)
Tests if assertion
is true
If the test fails, AssertionFailedException with no message is thrown.
Declaration
public static void IsTrue(bool assertion)
Parameters
Type | Name | Description |
---|---|---|
Boolean | assertion | The assertion value |
IsTrue(Boolean, String)
Tests if assertion
is true
If the test fails, AssertionFailedException with message
is thrown.
Declaration
public static void IsTrue(bool assertion, string message)
Parameters
Type | Name | Description |
---|---|---|
Boolean | assertion | The assertion value |
String | message | A message describing the failure condition. |
ShouldNeverReachHere()
Throws an AssertionFailedException with no specific message text.
Declaration
public static void ShouldNeverReachHere()
ShouldNeverReachHere(String)
Throws an AssertionFailedException with message
as specific message text.
Declaration
public static void ShouldNeverReachHere(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | A text describing the failure condition |