pub struct TestAppBuilder { /* private fields */ }Expand description
Builder for one Test App using a deterministic Driver.
Implementations§
Source§impl TestAppBuilder
impl TestAppBuilder
Sourcepub fn new(plan: ResolvedAppPlan) -> Self
pub fn new(plan: ResolvedAppPlan) -> Self
Starts with an exact immutable Plan.
Sourcepub fn with_factory(self, factory: impl NativePluginFactory) -> Self
pub fn with_factory(self, factory: impl NativePluginFactory) -> Self
Adds a native factory available to this test Host.
Sourcepub fn with_registry(self, registry: NativePluginRegistry) -> Self
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.
Sourcepub fn with_linked_factories(self) -> Self
pub fn with_linked_factories(self) -> Self
Adds factories linked into the test binary.
Sourcepub fn with_catalog(self, catalog: ExecutionAdapterCatalog) -> Self
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.
Sourcepub fn with_simulator(self, simulator: TestSimulator) -> Self
pub fn with_simulator(self, simulator: TestSimulator) -> Self
Uses one test-private Simulator for this exact App.
Sourcepub fn start(self) -> Result<TestApp, RuntimeFailure>
pub fn start(self) -> Result<TestApp, RuntimeFailure>
Boots the exact Plan through Kernel and the selected Adapter catalog.