referrerpolicy=no-referrer-when-downgrade
xcm_simulator

Trait TestExt

Source
pub trait TestExt {
    // Required methods
    fn new_ext() -> TestExternalities;
    fn reset_ext();
    fn execute_without_dispatch<R>(execute: impl FnOnce() -> R) -> R;
    fn dispatch_xcm_buses();

    // Provided method
    fn execute_with<R>(execute: impl FnOnce() -> R) -> R { ... }
}

Required Methods§

Source

fn new_ext() -> TestExternalities

Initialize the test environment.

Source

fn reset_ext()

Resets the state of the test environment.

Source

fn execute_without_dispatch<R>(execute: impl FnOnce() -> R) -> R

Execute code in the context of the test externalities, without automatic message processing. All messages in the message buses can be processed by calling Self::dispatch_xcm_buses().

Source

fn dispatch_xcm_buses()

Process all messages in the message buses

Provided Methods§

Source

fn execute_with<R>(execute: impl FnOnce() -> R) -> R

Execute some code in the context of the test externalities, with automatic message processing. Messages are dispatched once the passed closure completes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl TestExt for ParaA

impl TestExt for Relay

impl TestExt for ParaA

impl TestExt for Relay

impl TestExt for ParaA

impl TestExt for Relay

impl TestExt for ParaA

impl TestExt for ParaB

impl TestExt for ParaC

impl TestExt for Relay

impl TestExt for ParaA

impl TestExt for ParaB

impl TestExt for Relay