 | IEventFilterApplier.Expect<T> Method (Int32, TimeSpan, Func<T>) |
Executes
func and expects the specified number
of events to be logged during the execution.
This function fails and throws an exception if more events than expected are logged,
or if a timeout occurs. The timeout is taken from the config value
"akka.test.filter-leeway", see
TestEventFilterLeeway.
Namespace:
Akka.TestKit
Assembly:
Akka.TestKit (in Akka.TestKit.dll) Version: 1.2.3.129 (1.2.3.129)
SyntaxT Expect<T>(
int expectedCount,
TimeSpan timeout,
Func<T> func
)
abstract Expect :
expectedCount : int *
timeout : TimeSpan *
func : Func<'T> -> 'T
Parameters
- expectedCount
- Type: System.Int32
The expected number of events - timeout
- Type: System.TimeSpan
The time to wait for log events after executing func - func
- Type: System.Func<T>
The function.
Type Parameters
- T
- The return value of the function
Return Value
Type:
TThe returned value from
func.
See Also