RxTest
struct · ferroui-reactiveui-testing · v0.5.0
struct RxTest
Runs a test of the application builder of Splat from a clean builder state, one test at a time
and within a time limit (RxTest).
Deviation (DEVIATIONS.md, ReactiveUI): the state of the application builder is per thread, as the rest of the state of ReactiveUI and Splat is, so the gate lets one test of the thread run at a time, not one of the process.
Members
app_builder_test_async
fn app_builder_test_async<Fut: Future<Output = Result<(), ObservableError>> + 'static>(test_body: impl FnOnce() -> Fut + 'static) -> Shared<Result<(), ObservableError>>
app_builder_test_async_with with the default time
limit of 60 seconds (AppBuilderTestAsync(Func<Task>)).
app_builder_test_async_with
fn app_builder_test_async_with<Fut: Future<Output = Result<(), ObservableError>> + 'static>(test_body: impl FnOnce() -> Fut + 'static, max_wait_ms: u64) -> Shared<Result<(), ObservableError>>
Runs test_body once no other test of the application builder runs, with the state of the
application builder reset before and after it, and gives a task that ends as the test does,
the Shared of its result (AppBuilderTestAsync(Func<Task>, int)). The test body gives a
future of a Result<(), ObservableError>, which runs as a task of the thread.
The task ends with a TimeoutError when the gate is not free within max_wait_ms
milliseconds, or when the test runs longer than that; with the error of the test when it
fails, and with the error of a panic (PanicError) when test_body panics, as an
exception thrown in an async method faults its task.
Not ported: the ArgumentException of a null test body - argument validation.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>Any
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.