Search Results for

    Show / Hide Table of Contents

    Interface ITestKitAssertions

    This interface defines several common assert patterns used in the various testkits.

    Namespace: Akka.TestKit
    Assembly: Akka.TestKit.dll
    Syntax
    public interface ITestKitAssertions

    Methods

    | Edit this page View Source

    AssertEqual<T>(T, T, Func<T, T, bool>, string, params object[])

    Verifies that the two specified values (expected and actual are equal using a specified comparison function comparer.

    Declaration
    void AssertEqual<T>(T expected, T actual, Func<T, T, bool> comparer, string format = "", params object[] args)
    Parameters
    Type Name Description
    T expected

    The expected value of the object

    T actual

    The actual value of the object

    Func<T, T, bool> comparer

    The function used to compare the two specified values.

    string format

    A template string to display if the assertion fails.

    object[] args

    An optional object array that contains zero or more objects to format.

    Type Parameters
    Name Description
    T

    The type that is being compared.

    | Edit this page View Source

    AssertEqual<T>(T, T, string, params object[])

    Verifies that the two specified values (expected and actual are equal.

    Declaration
    void AssertEqual<T>(T expected, T actual, string format = "", params object[] args)
    Parameters
    Type Name Description
    T expected

    The expected value of the object

    T actual

    The actual value of the object

    string format

    A template string to display if the assertion fails.

    object[] args

    An optional object array that contains zero or more objects to format.

    Type Parameters
    Name Description
    T

    The type that is being compared.

    | Edit this page View Source

    AssertFalse(bool, string, params object[])

    Verifies that a specified condition is false.

    Declaration
    void AssertFalse(bool condition, string format = "", params object[] args)
    Parameters
    Type Name Description
    bool condition

    The condition that is being verified.

    string format

    A template string to display if the assertion fails.

    object[] args

    An optional object array that contains zero or more objects to format.

    | Edit this page View Source

    AssertTrue(bool, string, params object[])

    Verifies that a specified condition is true.

    Declaration
    void AssertTrue(bool condition, string format = "", params object[] args)
    Parameters
    Type Name Description
    bool condition

    The condition that is being verified

    string format

    A template string to display if the assertion fails

    object[] args

    An optional object array that contains zero or more objects to format.

    | Edit this page View Source

    Fail(string, params object[])

    Fails an assertion without checking any conditions.

    Declaration
    void Fail(string format = "", params object[] args)
    Parameters
    Type Name Description
    string format

    A template string to display if the assertion fails

    object[] args

    An optional object array that contains zero or more objects to format.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET