Table of Contents

Interface ITestKitAssertions

Namespace
Akka.TestKit
Assembly
Akka.TestKit.dll

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

public interface ITestKitAssertions

Methods

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.

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

Parameters

expected T

The expected value of the object

actual T

The actual value of the object

comparer Func<T, T, bool>

The function used to compare the two specified values.

format string

A template string to display if the assertion fails.

args object[]

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

Type Parameters

T

The type that is being compared.

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

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

void AssertEqual<T>(T expected, T actual, string format = "", params object[] args)

Parameters

expected T

The expected value of the object

actual T

The actual value of the object

format string

A template string to display if the assertion fails.

args object[]

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

Type Parameters

T

The type that is being compared.

AssertFalse(bool, string, params object[])

Verifies that a specified condition is false.

void AssertFalse(bool condition, string format = "", params object[] args)

Parameters

condition bool

The condition that is being verified.

format string

A template string to display if the assertion fails.

args object[]

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

AssertTrue(bool, string, params object[])

Verifies that a specified condition is true.

void AssertTrue(bool condition, string format = "", params object[] args)

Parameters

condition bool

The condition that is being verified

format string

A template string to display if the assertion fails

args object[]

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

Fail(string, params object[])

Fails an assertion without checking any conditions.

void Fail(string format = "", params object[] args)

Parameters

format string

A template string to display if the assertion fails

args object[]

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