Documentation ¶
Index ¶
- type PollMock
- func (mock *PollMock) AllowOverride()
- func (mock *PollMock) AllowOverrideCalls() []struct{}
- func (mock *PollMock) Delete() error
- func (mock *PollMock) DeleteCalls() []struct{}
- func (mock *PollMock) GetKey() exported.PollKey
- func (mock *PollMock) GetKeyCalls() []struct{}
- func (mock *PollMock) GetResult() codec.ProtoMarshaler
- func (mock *PollMock) GetResultCalls() []struct{}
- func (mock *PollMock) GetTotalVotingPower() github_com_cosmos_cosmos_sdk_types.Int
- func (mock *PollMock) GetTotalVotingPowerCalls() []struct{}
- func (mock *PollMock) GetVoters() []exported.Voter
- func (mock *PollMock) GetVotersCalls() []struct{}
- func (mock *PollMock) Is(state exported.PollState) bool
- func (mock *PollMock) IsCalls() []struct{ ... }
- func (mock *PollMock) Vote(voter github_com_cosmos_cosmos_sdk_types.ValAddress, data codec.ProtoMarshaler) error
- func (mock *PollMock) VoteCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PollMock ¶
type PollMock struct { // AllowOverrideFunc mocks the AllowOverride method. AllowOverrideFunc func() // DeleteFunc mocks the Delete method. DeleteFunc func() error // GetKeyFunc mocks the GetKey method. GetKeyFunc func() exported.PollKey // GetResultFunc mocks the GetResult method. GetResultFunc func() codec.ProtoMarshaler // GetTotalVotingPowerFunc mocks the GetTotalVotingPower method. GetTotalVotingPowerFunc func() github_com_cosmos_cosmos_sdk_types.Int // GetVotersFunc mocks the GetVoters method. GetVotersFunc func() []exported.Voter // IsFunc mocks the Is method. IsFunc func(state exported.PollState) bool // VoteFunc mocks the Vote method. VoteFunc func(voter github_com_cosmos_cosmos_sdk_types.ValAddress, data codec.ProtoMarshaler) error // contains filtered or unexported fields }
PollMock is a mock implementation of exported.Poll.
func TestSomethingThatUsesPoll(t *testing.T) { // make and configure a mocked exported.Poll mockedPoll := &PollMock{ AllowOverrideFunc: func() { panic("mock out the AllowOverride method") }, DeleteFunc: func() error { panic("mock out the Delete method") }, GetKeyFunc: func() exported.PollKey { panic("mock out the GetKey method") }, GetResultFunc: func() codec.ProtoMarshaler { panic("mock out the GetResult method") }, GetTotalVotingPowerFunc: func() github_com_cosmos_cosmos_sdk_types.Int { panic("mock out the GetTotalVotingPower method") }, GetVotersFunc: func() []exported.Voter { panic("mock out the GetVoters method") }, IsFunc: func(state exported.PollState) bool { panic("mock out the Is method") }, VoteFunc: func(voter github_com_cosmos_cosmos_sdk_types.ValAddress, data codec.ProtoMarshaler) error { panic("mock out the Vote method") }, } // use mockedPoll in code that requires exported.Poll // and then make assertions. }
func (*PollMock) AllowOverride ¶
func (mock *PollMock) AllowOverride()
AllowOverride calls AllowOverrideFunc.
func (*PollMock) AllowOverrideCalls ¶
func (mock *PollMock) AllowOverrideCalls() []struct { }
AllowOverrideCalls gets all the calls that were made to AllowOverride. Check the length with:
len(mockedPoll.AllowOverrideCalls())
func (*PollMock) DeleteCalls ¶
func (mock *PollMock) DeleteCalls() []struct { }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedPoll.DeleteCalls())
func (*PollMock) GetKeyCalls ¶
func (mock *PollMock) GetKeyCalls() []struct { }
GetKeyCalls gets all the calls that were made to GetKey. Check the length with:
len(mockedPoll.GetKeyCalls())
func (*PollMock) GetResult ¶
func (mock *PollMock) GetResult() codec.ProtoMarshaler
GetResult calls GetResultFunc.
func (*PollMock) GetResultCalls ¶
func (mock *PollMock) GetResultCalls() []struct { }
GetResultCalls gets all the calls that were made to GetResult. Check the length with:
len(mockedPoll.GetResultCalls())
func (*PollMock) GetTotalVotingPower ¶
func (mock *PollMock) GetTotalVotingPower() github_com_cosmos_cosmos_sdk_types.Int
GetTotalVotingPower calls GetTotalVotingPowerFunc.
func (*PollMock) GetTotalVotingPowerCalls ¶
func (mock *PollMock) GetTotalVotingPowerCalls() []struct { }
GetTotalVotingPowerCalls gets all the calls that were made to GetTotalVotingPower. Check the length with:
len(mockedPoll.GetTotalVotingPowerCalls())
func (*PollMock) GetVotersCalls ¶
func (mock *PollMock) GetVotersCalls() []struct { }
GetVotersCalls gets all the calls that were made to GetVoters. Check the length with:
len(mockedPoll.GetVotersCalls())
func (*PollMock) IsCalls ¶
IsCalls gets all the calls that were made to Is. Check the length with:
len(mockedPoll.IsCalls())
func (*PollMock) Vote ¶
func (mock *PollMock) Vote(voter github_com_cosmos_cosmos_sdk_types.ValAddress, data codec.ProtoMarshaler) error
Vote calls VoteFunc.
func (*PollMock) VoteCalls ¶
func (mock *PollMock) VoteCalls() []struct { Voter github_com_cosmos_cosmos_sdk_types.ValAddress Data codec.ProtoMarshaler }
VoteCalls gets all the calls that were made to Vote. Check the length with:
len(mockedPoll.VoteCalls())