pub struct TestApp { /* private fields */ }Expand description
A running deterministic App that exposes the real Kernel handle to tests.
Implementations§
Source§impl TestApp
impl TestApp
Sourcepub fn builder(plan: ResolvedAppPlan) -> TestAppBuilder
pub fn builder(plan: ResolvedAppPlan) -> TestAppBuilder
Creates a builder for an exact immutable Plan.
Sourcepub fn app(&self) -> &NativeApp
pub fn app(&self) -> &NativeApp
Returns the running App for typed generated Client handles and diagnostics.
Sourcepub fn simulator(&self) -> &TestSimulator
pub fn simulator(&self) -> &TestSimulator
Returns this App’s test-private simulated execution environment.
Sourcepub fn client<C>(&self, consumer_instance: &str) -> Result<C, RuntimeFailure>
pub fn client<C>(&self, consumer_instance: &str) -> Result<C, RuntimeFailure>
Connects one generated Client from a consumer Instance’s Plan-owned bindings.
Sourcepub fn run<F: Future>(&self, future: F) -> F::Output
pub fn run<F: Future>(&self, future: F) -> F::Output
Runs one future to completion on deterministic virtual time.
Sourcepub fn advance(&self, duration: Duration)
pub fn advance(&self, duration: Duration)
Advances deterministic virtual time and wakes elapsed timers.
Sourcepub fn shutdown(&self, timeout: Duration) -> ShutdownOutcome
pub fn shutdown(&self, timeout: Duration) -> ShutdownOutcome
Shuts down the App and returns the exact cleanup outcome.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TestApp
impl !Send for TestApp
impl !Sync for TestApp
impl !UnwindSafe for TestApp
impl Freeze for TestApp
impl Unpin for TestApp
impl UnsafeUnpin for TestApp
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