Skip to main content

TestAppBuilder

Struct TestAppBuilder 

Source
pub struct TestAppBuilder { /* private fields */ }
Expand description

Builder for one Test App using a deterministic Driver.

Implementations§

Source§

impl TestAppBuilder

Source

pub fn new(plan: ResolvedAppPlan) -> Self

Starts with an exact immutable Plan.

Source

pub fn with_factory(self, factory: impl NativePluginFactory) -> Self

Adds a native factory available to this test Host.

Source

pub fn with_registry(self, registry: NativePluginRegistry) -> Self

Uses an exact Host-owned native factory registry for this test App.

This is primarily for Adapter crates whose real Host composition builds a registry containing both Plugin and ingress factories. The immutable Plan remains the only source of Plugin dependency selection.

Source

pub fn with_linked_factories(self) -> Self

Adds factories linked into the test binary.

Source

pub fn with_catalog(self, catalog: ExecutionAdapterCatalog) -> Self

Uses the exact Host-lowered catalog, including non-Native Adapters.

Registry/factory inputs and repeated catalogs are rejected by start before any factory executes. Virtual Driver time does not virtualize Bun processes, JavaScript timers or external I/O.

Source

pub fn with_simulator(self, simulator: TestSimulator) -> Self

Uses one test-private Simulator for this exact App.

Source

pub fn start(self) -> Result<TestApp, RuntimeFailure>

Boots the exact Plan through Kernel and the selected Adapter catalog.

Trait Implementations§

Source§

impl Debug for TestAppBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.