| TestKitBaseExpectMsgAllOfT Method (TimeSpan, T) |
Receive a number of messages from the test actor matching the given
number of objects and assert that for each given object one is received
which equals it and vice versa. This construct is useful when the order in
which the objects are received is not fixed. Wait time is bounded by the
given duration, with an assertion exception being thrown in case of timeout.
dispatcher.Tell(SomeWork1())
dispatcher.Tell(SomeWork2())
ExpectMsgAllOf(TimeSpan.FromSeconds(1), Result1(), Result2())
The deadline is scaled by "akka.test.timefactor" using
Dilated(TimeSpan).
Namespace:
Akka.TestKit
Assembly:
Akka.TestKit (in Akka.TestKit.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public IReadOnlyCollection<T> ExpectMsgAllOf<T>(
TimeSpan max,
params T[] messages
)
member ExpectMsgAllOf :
max : TimeSpan *
messages : 'T[] -> IReadOnlyCollection<'T>
Parameters
- max
- Type: SystemTimeSpan
The deadline. The deadline is scaled by "akka.test.timefactor" using Dilated(TimeSpan). - messages
- Type: T
The messages.
Type Parameters
- T
- The type of the messages
Return Value
Type:
IReadOnlyCollectionTThe received messages in received order
See Also