pub trait TestContext: Sized {
    // Required method
    fn setup() -> Self;

    // Provided method
    fn teardown(self) { ... }
}
Expand description

The trait to implement to get setup/teardown functionality for tests.

Required Methods§

source

fn setup() -> Self

Create the context. This is run once before each test that uses the context.

Provided Methods§

source

fn teardown(self)

Perform any additional cleanup of the context besides that already provided by normal “drop” semantics.

Implementors§

source§

impl<T> TestContext for Twhere T: AsyncTestContext + Send,