pub trait RegisterMockApplication {
    // Required methods
    fn creator_chain_id(&self) -> ChainId;
    async fn registered_application_count(&self) -> Result<usize>;
    async fn register_mock_application_with(
        &mut self,
        description: UserApplicationDescription,
        contract: Blob,
        service: Blob,
    ) -> Result<(UserApplicationId, MockApplication)>;

    // Provided method
    async fn register_mock_application(
        &mut self,
    ) -> Result<(UserApplicationId, MockApplication)> { ... }
}
Expand description

Registration of MockApplications to use in tests.

Required Methods§

source

fn creator_chain_id(&self) -> ChainId

Returns the chain to use for the creation of the application.

This is included in the mocked ApplicationId.

source

async fn registered_application_count(&self) -> Result<usize>

Returns the amount of known registered applications.

Used to avoid duplicate registrations.

source

async fn register_mock_application_with( &mut self, description: UserApplicationDescription, contract: Blob, service: Blob, ) -> Result<(UserApplicationId, MockApplication)>

Registers a new MockApplication associated with a UserApplicationDescription and its bytecode Blobs.

Provided Methods§

source

async fn register_mock_application( &mut self, ) -> Result<(UserApplicationId, MockApplication)>

Registers a new MockApplication and returns it with the UserApplicationId that was used for it.

Object Safety§

This trait is not object safe.

Implementors§