expectEventType

open fun expectEventType(vararg expected: KClass<*>): AE

Expects events of specific types in the exact order provided.

This method validates both the count and the types of events in the stream, ensuring they match the expected sequence exactly.

Return

the current expecter instance for method chaining

Parameters

expected

variable number of KClass objects representing the expected event types in order

Throws

if the event types don't match the expected sequence


open fun expectEventType(vararg expected: Class<*>): AE

Expects events of specific types in the exact order provided (Java-friendly overload).

This method accepts Class objects instead of KClass, making it more convenient for Java integration while maintaining the same validation logic.

Return

the current expecter instance for method chaining

Parameters

expected

variable number of Class objects representing the expected event types in order

Throws

if the event types don't match the expected sequence