# AppBuilderTestBase

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-testing/trait-appbuildertestbase/

**trait** · [`ferroui-reactiveui-testing`](/docs/0.5.0/api/ferroui-reactiveui-testing/) · v0.5.0

```rust
trait AppBuilderTestBase
```

The base of the fixtures of tests of the application builder, which gives them
`RxTest::app_builder_test_async` (`AppBuilderTestBase`).

Deviation (DEVIATIONS.md, ReactiveUI): upstream's abstract base class with protected static
helpers is a trait with provided functions; a fixture implements it (`impl AppBuilderTestBase
for MyTests {}`) and calls `MyTests::run_app_builder_test_async(..)`. The overload that takes an
`Action` is `run_app_builder_test_action`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/app_builder_test_base.rs#L15)

## Members

- [`run_app_builder_test_async`](#function-run_app_builder_test_async)
- [`run_app_builder_test_action`](#function-run_app_builder_test_action)

<a id="function-run_app_builder_test_async"></a>

### run_app_builder_test_async

```rust
fn run_app_builder_test_async<Fut: Future<Output = Result<(), ObservableError>> + 'static>(test_body: impl FnOnce() -> Fut + 'static) -> Shared<Result<(), ObservableError>>
```

Runs an asynchronous test of the application builder
(`RunAppBuilderTestAsync(Func<Task>)`): see `RxTest::app_builder_test_async`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/app_builder_test_base.rs#L18)

<a id="function-run_app_builder_test_action"></a>

### run_app_builder_test_action

```rust
fn run_app_builder_test_action(test_body: impl FnOnce() -> () + 'static) -> Shared<Result<(), ObservableError>>
```

Runs a synchronous test of the application builder (`RunAppBuilderTestAsync(Action)`): see
`RxTest::app_builder_test_async`. A panic of `test_body` ends the returned task with the
error of the panic.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/app_builder_test_base.rs#L27)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
