Documentation ¶
Index ¶
- type FeeTx
- type FeeTxMock
- func (mock *FeeTxMock) FeeGranter() sdk.AccAddress
- func (mock *FeeTxMock) FeeGranterCalls() []struct{}
- func (mock *FeeTxMock) FeePayer() sdk.AccAddress
- func (mock *FeeTxMock) FeePayerCalls() []struct{}
- func (mock *FeeTxMock) GetFee() sdk.Coins
- func (mock *FeeTxMock) GetFeeCalls() []struct{}
- func (mock *FeeTxMock) GetGas() uint64
- func (mock *FeeTxMock) GetGasCalls() []struct{}
- func (mock *FeeTxMock) GetMsgs() []sdk.Msg
- func (mock *FeeTxMock) GetMsgsCalls() []struct{}
- func (mock *FeeTxMock) ValidateBasic() error
- func (mock *FeeTxMock) ValidateBasicCalls() []struct{}
- type Msg
- type MsgMock
- func (mock *MsgMock) Descriptor() ([]byte, []int)
- func (mock *MsgMock) DescriptorCalls() []struct{}
- func (mock *MsgMock) GetSigners() []sdk.AccAddress
- func (mock *MsgMock) GetSignersCalls() []struct{}
- func (mock *MsgMock) ProtoMessage()
- func (mock *MsgMock) ProtoMessageCalls() []struct{}
- func (mock *MsgMock) Reset()
- func (mock *MsgMock) ResetCalls() []struct{}
- func (mock *MsgMock) String() string
- func (mock *MsgMock) StringCalls() []struct{}
- func (mock *MsgMock) ValidateBasic() error
- func (mock *MsgMock) ValidateBasicCalls() []struct{}
- type PermissionMock
- type StakingMock
- type Tx
- type TxMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeeTxMock ¶ added in v0.36.0
type FeeTxMock struct { // FeeGranterFunc mocks the FeeGranter method. FeeGranterFunc func() sdk.AccAddress // FeePayerFunc mocks the FeePayer method. FeePayerFunc func() sdk.AccAddress // GetFeeFunc mocks the GetFee method. GetFeeFunc func() sdk.Coins // GetGasFunc mocks the GetGas method. GetGasFunc func() uint64 // GetMsgsFunc mocks the GetMsgs method. GetMsgsFunc func() []sdk.Msg // ValidateBasicFunc mocks the ValidateBasic method. ValidateBasicFunc func() error // contains filtered or unexported fields }
FeeTxMock is a mock implementation of FeeTx.
func TestSomethingThatUsesFeeTx(t *testing.T) { // make and configure a mocked FeeTx mockedFeeTx := &FeeTxMock{ FeeGranterFunc: func() sdk.AccAddress { panic("mock out the FeeGranter method") }, FeePayerFunc: func() sdk.AccAddress { panic("mock out the FeePayer method") }, GetFeeFunc: func() sdk.Coins { panic("mock out the GetFee method") }, GetGasFunc: func() uint64 { panic("mock out the GetGas method") }, GetMsgsFunc: func() []sdk.Msg { panic("mock out the GetMsgs method") }, ValidateBasicFunc: func() error { panic("mock out the ValidateBasic method") }, } // use mockedFeeTx in code that requires FeeTx // and then make assertions. }
func (*FeeTxMock) FeeGranter ¶ added in v0.36.0
func (mock *FeeTxMock) FeeGranter() sdk.AccAddress
FeeGranter calls FeeGranterFunc.
func (*FeeTxMock) FeeGranterCalls ¶ added in v0.36.0
func (mock *FeeTxMock) FeeGranterCalls() []struct { }
FeeGranterCalls gets all the calls that were made to FeeGranter. Check the length with:
len(mockedFeeTx.FeeGranterCalls())
func (*FeeTxMock) FeePayer ¶ added in v0.36.0
func (mock *FeeTxMock) FeePayer() sdk.AccAddress
FeePayer calls FeePayerFunc.
func (*FeeTxMock) FeePayerCalls ¶ added in v0.36.0
func (mock *FeeTxMock) FeePayerCalls() []struct { }
FeePayerCalls gets all the calls that were made to FeePayer. Check the length with:
len(mockedFeeTx.FeePayerCalls())
func (*FeeTxMock) GetFeeCalls ¶ added in v0.36.0
func (mock *FeeTxMock) GetFeeCalls() []struct { }
GetFeeCalls gets all the calls that were made to GetFee. Check the length with:
len(mockedFeeTx.GetFeeCalls())
func (*FeeTxMock) GetGasCalls ¶ added in v0.36.0
func (mock *FeeTxMock) GetGasCalls() []struct { }
GetGasCalls gets all the calls that were made to GetGas. Check the length with:
len(mockedFeeTx.GetGasCalls())
func (*FeeTxMock) GetMsgsCalls ¶ added in v0.36.0
func (mock *FeeTxMock) GetMsgsCalls() []struct { }
GetMsgsCalls gets all the calls that were made to GetMsgs. Check the length with:
len(mockedFeeTx.GetMsgsCalls())
func (*FeeTxMock) ValidateBasic ¶ added in v0.36.0
ValidateBasic calls ValidateBasicFunc.
func (*FeeTxMock) ValidateBasicCalls ¶ added in v0.36.0
func (mock *FeeTxMock) ValidateBasicCalls() []struct { }
ValidateBasicCalls gets all the calls that were made to ValidateBasic. Check the length with:
len(mockedFeeTx.ValidateBasicCalls())
type MsgMock ¶
type MsgMock struct { // DescriptorFunc mocks the Descriptor method. DescriptorFunc func() ([]byte, []int) // GetSignersFunc mocks the GetSigners method. GetSignersFunc func() []sdk.AccAddress // ProtoMessageFunc mocks the ProtoMessage method. ProtoMessageFunc func() // ResetFunc mocks the Reset method. ResetFunc func() // StringFunc mocks the String method. StringFunc func() string // ValidateBasicFunc mocks the ValidateBasic method. ValidateBasicFunc func() error // contains filtered or unexported fields }
MsgMock is a mock implementation of Msg.
func TestSomethingThatUsesMsg(t *testing.T) { // make and configure a mocked Msg mockedMsg := &MsgMock{ DescriptorFunc: func() ([]byte, []int) { panic("mock out the Descriptor method") }, GetSignersFunc: func() []sdk.AccAddress { panic("mock out the GetSigners method") }, ProtoMessageFunc: func() { panic("mock out the ProtoMessage method") }, ResetFunc: func() { panic("mock out the Reset method") }, StringFunc: func() string { panic("mock out the String method") }, ValidateBasicFunc: func() error { panic("mock out the ValidateBasic method") }, } // use mockedMsg in code that requires Msg // and then make assertions. }
func (*MsgMock) Descriptor ¶
Descriptor calls DescriptorFunc.
func (*MsgMock) DescriptorCalls ¶
func (mock *MsgMock) DescriptorCalls() []struct { }
DescriptorCalls gets all the calls that were made to Descriptor. Check the length with:
len(mockedMsg.DescriptorCalls())
func (*MsgMock) GetSigners ¶
func (mock *MsgMock) GetSigners() []sdk.AccAddress
GetSigners calls GetSignersFunc.
func (*MsgMock) GetSignersCalls ¶
func (mock *MsgMock) GetSignersCalls() []struct { }
GetSignersCalls gets all the calls that were made to GetSigners. Check the length with:
len(mockedMsg.GetSignersCalls())
func (*MsgMock) ProtoMessage ¶
func (mock *MsgMock) ProtoMessage()
ProtoMessage calls ProtoMessageFunc.
func (*MsgMock) ProtoMessageCalls ¶
func (mock *MsgMock) ProtoMessageCalls() []struct { }
ProtoMessageCalls gets all the calls that were made to ProtoMessage. Check the length with:
len(mockedMsg.ProtoMessageCalls())
func (*MsgMock) ResetCalls ¶
func (mock *MsgMock) ResetCalls() []struct { }
ResetCalls gets all the calls that were made to Reset. Check the length with:
len(mockedMsg.ResetCalls())
func (*MsgMock) StringCalls ¶
func (mock *MsgMock) StringCalls() []struct { }
StringCalls gets all the calls that were made to String. Check the length with:
len(mockedMsg.StringCalls())
func (*MsgMock) ValidateBasic ¶
ValidateBasic calls ValidateBasicFunc.
func (*MsgMock) ValidateBasicCalls ¶
func (mock *MsgMock) ValidateBasicCalls() []struct { }
ValidateBasicCalls gets all the calls that were made to ValidateBasic. Check the length with:
len(mockedMsg.ValidateBasicCalls())
type PermissionMock ¶
type PermissionMock struct { // GetRoleFunc mocks the GetRole method. GetRoleFunc func(ctx sdk.Context, address sdk.AccAddress) permission.Role // contains filtered or unexported fields }
PermissionMock is a mock implementation of types.Permission.
func TestSomethingThatUsesPermission(t *testing.T) { // make and configure a mocked types.Permission mockedPermission := &PermissionMock{ GetRoleFunc: func(ctx sdk.Context, address sdk.AccAddress) permission.Role { panic("mock out the GetRole method") }, } // use mockedPermission in code that requires types.Permission // and then make assertions. }
func (*PermissionMock) GetRole ¶
func (mock *PermissionMock) GetRole(ctx sdk.Context, address sdk.AccAddress) permission.Role
GetRole calls GetRoleFunc.
func (*PermissionMock) GetRoleCalls ¶
func (mock *PermissionMock) GetRoleCalls() []struct { Ctx sdk.Context Address sdk.AccAddress }
GetRoleCalls gets all the calls that were made to GetRole. Check the length with:
len(mockedPermission.GetRoleCalls())
type StakingMock ¶ added in v0.21.0
type StakingMock struct { // ValidatorFunc mocks the Validator method. ValidatorFunc func(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI // contains filtered or unexported fields }
StakingMock is a mock implementation of types.Staking.
func TestSomethingThatUsesStaking(t *testing.T) { // make and configure a mocked types.Staking mockedStaking := &StakingMock{ ValidatorFunc: func(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI { panic("mock out the Validator method") }, } // use mockedStaking in code that requires types.Staking // and then make assertions. }
func (*StakingMock) Validator ¶ added in v0.21.0
func (mock *StakingMock) Validator(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI
Validator calls ValidatorFunc.
func (*StakingMock) ValidatorCalls ¶ added in v0.21.0
func (mock *StakingMock) ValidatorCalls() []struct { Ctx sdk.Context Addr sdk.ValAddress }
ValidatorCalls gets all the calls that were made to Validator. Check the length with:
len(mockedStaking.ValidatorCalls())
type TxMock ¶
type TxMock struct { // GetMsgsFunc mocks the GetMsgs method. GetMsgsFunc func() []sdk.Msg // ValidateBasicFunc mocks the ValidateBasic method. ValidateBasicFunc func() error // contains filtered or unexported fields }
TxMock is a mock implementation of Tx.
func TestSomethingThatUsesTx(t *testing.T) { // make and configure a mocked Tx mockedTx := &TxMock{ GetMsgsFunc: func() []sdk.Msg { panic("mock out the GetMsgs method") }, ValidateBasicFunc: func() error { panic("mock out the ValidateBasic method") }, } // use mockedTx in code that requires Tx // and then make assertions. }
func (*TxMock) GetMsgsCalls ¶
func (mock *TxMock) GetMsgsCalls() []struct { }
GetMsgsCalls gets all the calls that were made to GetMsgs. Check the length with:
len(mockedTx.GetMsgsCalls())
func (*TxMock) ValidateBasic ¶
ValidateBasic calls ValidateBasicFunc.
func (*TxMock) ValidateBasicCalls ¶
func (mock *TxMock) ValidateBasicCalls() []struct { }
ValidateBasicCalls gets all the calls that were made to ValidateBasic. Check the length with:
len(mockedTx.ValidateBasicCalls())