Trait drink_next::session::mocking_api::MockingApi
source · 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§
sourcefn deploy(&mut self, mock: ContractMock) -> AccountIdFor<R::Config>
fn deploy(&mut self, mock: ContractMock) -> AccountIdFor<R::Config>
Deploy mock
as a standard contract. Returns the address of the deployed contract.
sourcefn mock_existing_contract(
&mut self,
_mock: ContractMock,
_address: AccountIdFor<R::Config>
)
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.