Skip to main content

RxTest

Struct RxTest 

Source
pub struct RxTest;
Expand description

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.

Implementations§

Source§

impl RxTest

Source

pub fn app_builder_test_async( test_body: impl FnOnce() -> Task<()> + 'static, ) -> Task<()> ⓘ

app_builder_test_async_with with the default time limit of 60 seconds (AppBuilderTestAsync(Func<Task>)).

Source

pub fn app_builder_test_async_with( test_body: impl FnOnce() -> Task<()> + 'static, max_wait_ms: u64, ) -> Task<()> ⓘ

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 (AppBuilderTestAsync(Func<Task>, int)).

The task ends with a TimeoutException 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 (PanicException) 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.

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, 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.