pub trait TestContext
where Self: 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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> TestContext for T