[−][src]Trait spekt::Test
Test-running trait to handle test lifecycles
Associated Types
type Error: Display + Send + Sync
[src]
The format-able error shared by each step. anyhow::Error is recommended!
Required methods
#[must_use]fn before<'async_trait>(
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Initialize test suite with new instance of test's state
Provided methods
#[must_use]fn after<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Optionally clean up after test run
#[must_use]fn test<'async_trait, F, T>(
task: T
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
F: Future<Output = Result<(), Self::Error>> + Send,
T: Send + Sync + FnOnce(Arc<Self>) -> F,
F: 'async_trait,
T: 'async_trait,
Self: Send + 'async_trait,
[src]
task: T
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
F: Future<Output = Result<(), Self::Error>> + Send,
T: Send + Sync + FnOnce(Arc<Self>) -> F,
F: 'async_trait,
T: 'async_trait,
Self: Send + 'async_trait,
Run a Result-emitting test task, handling assertion errors gracefully