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 MockApplication
s to use in tests.
Required Methods§
sourcefn creator_chain_id(&self) -> ChainId
fn creator_chain_id(&self) -> ChainId
Returns the chain to use for the creation of the application.
This is included in the mocked ApplicationId
.
sourceasync fn registered_application_count(&self) -> Result<usize>
async fn registered_application_count(&self) -> Result<usize>
Returns the amount of known registered applications.
Used to avoid duplicate registrations.
sourceasync fn register_mock_application_with(
&mut self,
description: UserApplicationDescription,
contract: Blob,
service: Blob,
) -> Result<(UserApplicationId, MockApplication)>
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 Blob
s.
Provided Methods§
sourceasync fn register_mock_application(
&mut self,
) -> Result<(UserApplicationId, MockApplication)>
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.