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
| Improve this Doc View SourceAssertEqual<T>(T, T, Func<T, T, Boolean>, String, 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, Boolean> | 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. |
AssertEqual<T>(T, T, String, 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. |
AssertFalse(Boolean, String, Object[])
Verifies that a specified condition
is false.
Declaration
void AssertFalse(bool condition, string format = "", params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Boolean | 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. |
AssertTrue(Boolean, String, Object[])
Verifies that a specified condition
is true.
Declaration
void AssertTrue(bool condition, string format = "", params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Boolean | 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. |
Fail(String, 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. |