Documentation ¶
Index ¶
- type MultiSigKeeperMock
- func (mock *MultiSigKeeperMock) GetActiveKeyIDs(ctx github_com_cosmos_cosmos_sdk_types.Context, ...) []multisig.KeyID
- func (mock *MultiSigKeeperMock) GetActiveKeyIDsCalls() []struct{ ... }
- func (mock *MultiSigKeeperMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID multisig.KeyID) (multisig.Key, bool)
- func (mock *MultiSigKeeperMock) GetKeyCalls() []struct{ ... }
- type NexusMock
- type SnapshotterMock
- type StakingKeeperMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiSigKeeperMock ¶ added in v0.21.0
type MultiSigKeeperMock struct { // GetActiveKeyIDsFunc mocks the GetActiveKeyIDs method. GetActiveKeyIDsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) []multisig.KeyID // GetKeyFunc mocks the GetKey method. GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID multisig.KeyID) (multisig.Key, bool) // contains filtered or unexported fields }
MultiSigKeeperMock is a mock implementation of types.MultiSigKeeper.
func TestSomethingThatUsesMultiSigKeeper(t *testing.T) { // make and configure a mocked types.MultiSigKeeper mockedMultiSigKeeper := &MultiSigKeeperMock{ GetActiveKeyIDsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) []multisig.KeyID { panic("mock out the GetActiveKeyIDs method") }, GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID multisig.KeyID) (multisig.Key, bool) { panic("mock out the GetKey method") }, } // use mockedMultiSigKeeper in code that requires types.MultiSigKeeper // and then make assertions. }
func (*MultiSigKeeperMock) GetActiveKeyIDs ¶ added in v0.21.0
func (mock *MultiSigKeeperMock) GetActiveKeyIDs(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) []multisig.KeyID
GetActiveKeyIDs calls GetActiveKeyIDsFunc.
func (*MultiSigKeeperMock) GetActiveKeyIDsCalls ¶ added in v0.21.0
func (mock *MultiSigKeeperMock) GetActiveKeyIDsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context ChainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName }
GetActiveKeyIDsCalls gets all the calls that were made to GetActiveKeyIDs. Check the length with:
len(mockedMultiSigKeeper.GetActiveKeyIDsCalls())
func (*MultiSigKeeperMock) GetKey ¶ added in v0.21.0
func (mock *MultiSigKeeperMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID multisig.KeyID) (multisig.Key, bool)
GetKey calls GetKeyFunc.
func (*MultiSigKeeperMock) GetKeyCalls ¶ added in v0.21.0
func (mock *MultiSigKeeperMock) GetKeyCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context KeyID multisig.KeyID }
GetKeyCalls gets all the calls that were made to GetKey. Check the length with:
len(mockedMultiSigKeeper.GetKeyCalls())
type NexusMock ¶
type NexusMock struct { // GetChainsFunc mocks the GetChains method. GetChainsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain // contains filtered or unexported fields }
NexusMock is a mock implementation of types.Nexus.
func TestSomethingThatUsesNexus(t *testing.T) { // make and configure a mocked types.Nexus mockedNexus := &NexusMock{ GetChainsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain { panic("mock out the GetChains method") }, } // use mockedNexus in code that requires types.Nexus // and then make assertions. }
func (*NexusMock) GetChains ¶
func (mock *NexusMock) GetChains(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
GetChains calls GetChainsFunc.
func (*NexusMock) GetChainsCalls ¶
func (mock *NexusMock) GetChainsCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context }
GetChainsCalls gets all the calls that were made to GetChains. Check the length with:
len(mockedNexus.GetChainsCalls())
type SnapshotterMock ¶
type SnapshotterMock struct { // GetOperatorFunc mocks the GetOperator method. GetOperatorFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress // contains filtered or unexported fields }
SnapshotterMock is a mock implementation of types.Snapshotter.
func TestSomethingThatUsesSnapshotter(t *testing.T) { // make and configure a mocked types.Snapshotter mockedSnapshotter := &SnapshotterMock{ GetOperatorFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress { panic("mock out the GetOperator method") }, } // use mockedSnapshotter in code that requires types.Snapshotter // and then make assertions. }
func (*SnapshotterMock) GetOperator ¶
func (mock *SnapshotterMock) GetOperator(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress
GetOperator calls GetOperatorFunc.
func (*SnapshotterMock) GetOperatorCalls ¶
func (mock *SnapshotterMock) GetOperatorCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Proxy github_com_cosmos_cosmos_sdk_types.AccAddress }
GetOperatorCalls gets all the calls that were made to GetOperator. Check the length with:
len(mockedSnapshotter.GetOperatorCalls())
type StakingKeeperMock ¶
type StakingKeeperMock struct { // ValidatorFunc mocks the Validator method. ValidatorFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, addr github_com_cosmos_cosmos_sdk_types.ValAddress) stakingtypes.ValidatorI // contains filtered or unexported fields }
StakingKeeperMock is a mock implementation of types.StakingKeeper.
func TestSomethingThatUsesStakingKeeper(t *testing.T) { // make and configure a mocked types.StakingKeeper mockedStakingKeeper := &StakingKeeperMock{ ValidatorFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, addr github_com_cosmos_cosmos_sdk_types.ValAddress) stakingtypes.ValidatorI { panic("mock out the Validator method") }, } // use mockedStakingKeeper in code that requires types.StakingKeeper // and then make assertions. }
func (*StakingKeeperMock) Validator ¶
func (mock *StakingKeeperMock) Validator(ctx github_com_cosmos_cosmos_sdk_types.Context, addr github_com_cosmos_cosmos_sdk_types.ValAddress) stakingtypes.ValidatorI
Validator calls ValidatorFunc.
func (*StakingKeeperMock) ValidatorCalls ¶
func (mock *StakingKeeperMock) ValidatorCalls() []struct { Ctx github_com_cosmos_cosmos_sdk_types.Context Addr github_com_cosmos_cosmos_sdk_types.ValAddress }
ValidatorCalls gets all the calls that were made to Validator. Check the length with:
len(mockedStakingKeeper.ValidatorCalls())