Search Results for

    Show / Hide Table of Contents

    Class Assert

    A utility for making programming assertions.

    Inheritance
    object
    Assert
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public static class Assert

    Methods

    | Edit this page View Source

    IsEquals(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

    | Edit this page View Source

    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.

    | Edit this page View Source

    IsTrue(bool)

    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
    bool assertion

    The assertion value

    | Edit this page View Source

    IsTrue(bool, 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
    bool assertion

    The assertion value

    string message

    A message describing the failure condition.

    | Edit this page View Source

    ShouldNeverReachHere()

    Throws an AssertionFailedException with no specific message text.

    Declaration
    public static void ShouldNeverReachHere()
    | Edit this page View Source

    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

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX