assert_behaviour

Function assert_behaviour 

Source
pub async fn assert_behaviour<E: ErrorType, F: SessionFactory<E>, T: BehaviourFunction<E> + 'static>(
    session_factory: F,
    behaviour: T,
)
Expand description

The core function of this crate, it can be used to test the session returned by session_factory by executing behaviour against it - in other words, the InSender provided to behaviour will send messages to the created session, and the OutReceiver will receive messages the session sends to its ‘counterparty’. Any errors returned by either side will result in a panic.