pub trait MockingApi<R: Runtime> {
    // Required methods
    fn deploy(&mut self, mock: ContractMock) -> AccountIdFor<R::Config>;
    fn mock_existing_contract(
        &mut self,
        _mock: ContractMock,
        _address: AccountIdFor<R::Config>
    );
}
Expand description

Interface for basic mocking operations.

Required Methods§

source

fn deploy(&mut self, mock: ContractMock) -> AccountIdFor<R::Config>

Deploy mock as a standard contract. Returns the address of the deployed contract.

source

fn mock_existing_contract( &mut self, _mock: ContractMock, _address: AccountIdFor<R::Config> )

Mock part of an existing contract. In particular, allows to override real behavior of deployed contract’s messages.

Implementors§

source§

impl<R: Runtime> MockingApi<R> for Session<R>
where R::Config: Config,