pub struct TestFixture<T: DatabaseTestHelper> { /* private fields */ }Expand description
Test fixture
Manages test lifecycle with automatic setup/teardown.
Implementations§
Source§impl<T: DatabaseTestHelper> TestFixture<T>
impl<T: DatabaseTestHelper> TestFixture<T>
Sourcepub fn without_auto_cleanup(self) -> Self
pub fn without_auto_cleanup(self) -> Self
Disable automatic cleanup
Sourcepub async fn setup(&self) -> Result<(), IntegrationTestError>
pub async fn setup(&self) -> Result<(), IntegrationTestError>
Run setup
Sourcepub async fn teardown(&self) -> Result<(), IntegrationTestError>
pub async fn teardown(&self) -> Result<(), IntegrationTestError>
Run teardown
Sourcepub async fn run_test<F, Fut>(
&self,
test_fn: F,
) -> Result<(), IntegrationTestError>
pub async fn run_test<F, Fut>( &self, test_fn: F, ) -> Result<(), IntegrationTestError>
Auto Trait Implementations§
impl<T> Freeze for TestFixture<T>
impl<T> RefUnwindSafe for TestFixture<T>where
Arc<T>: RefUnwindSafe,
impl<T> Send for TestFixture<T>
impl<T> Sync for TestFixture<T>
impl<T> Unpin for TestFixture<T>
impl<T> UnsafeUnpin for TestFixture<T>where
Arc<T>: UnsafeUnpin,
impl<T> UnwindSafe for TestFixture<T>where
Arc<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging