pub trait RegisterMockApplication {
// Required methods
fn creator_chain_id(&self) -> ChainId;
async fn register_mock_application_with(
&mut self,
description: ApplicationDescription,
contract: Blob,
service: Blob,
) -> Result<(ApplicationId, MockApplication)>;
// Provided method
async fn register_mock_application(
&mut self,
index: u32,
) -> Result<(ApplicationId, MockApplication, [BlobId; 3])> { ... }
}
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 register_mock_application_with(
&mut self,
description: ApplicationDescription,
contract: Blob,
service: Blob,
) -> Result<(ApplicationId, MockApplication)>
async fn register_mock_application_with( &mut self, description: ApplicationDescription, contract: Blob, service: Blob, ) -> Result<(ApplicationId, MockApplication)>
Registers a new MockApplication
associated with a ApplicationDescription
and
its bytecode Blob
s.
Provided Methods§
Sourceasync fn register_mock_application(
&mut self,
index: u32,
) -> Result<(ApplicationId, MockApplication, [BlobId; 3])>
async fn register_mock_application( &mut self, index: u32, ) -> Result<(ApplicationId, MockApplication, [BlobId; 3])>
Registers a new MockApplication
and returns it with the ApplicationId
that was
used for it.
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.