Documentation ¶
Index ¶
- type PacketIMock
- func (mock *PacketIMock) GetData() []byte
- func (mock *PacketIMock) GetDataCalls() []struct{}
- func (mock *PacketIMock) GetDestChannel() string
- func (mock *PacketIMock) GetDestChannelCalls() []struct{}
- func (mock *PacketIMock) GetDestPort() string
- func (mock *PacketIMock) GetDestPortCalls() []struct{}
- func (mock *PacketIMock) GetSequence() uint64
- func (mock *PacketIMock) GetSequenceCalls() []struct{}
- func (mock *PacketIMock) GetSourceChannel() string
- func (mock *PacketIMock) GetSourceChannelCalls() []struct{}
- func (mock *PacketIMock) GetSourcePort() string
- func (mock *PacketIMock) GetSourcePortCalls() []struct{}
- func (mock *PacketIMock) GetTimeoutHeight() ibcexported.Height
- func (mock *PacketIMock) GetTimeoutHeightCalls() []struct{}
- func (mock *PacketIMock) GetTimeoutTimestamp() uint64
- func (mock *PacketIMock) GetTimeoutTimestampCalls() []struct{}
- func (mock *PacketIMock) ValidateBasic() error
- func (mock *PacketIMock) ValidateBasicCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketIMock ¶
type PacketIMock struct { // GetDataFunc mocks the GetData method. GetDataFunc func() []byte // GetDestChannelFunc mocks the GetDestChannel method. GetDestChannelFunc func() string // GetDestPortFunc mocks the GetDestPort method. GetDestPortFunc func() string // GetSequenceFunc mocks the GetSequence method. GetSequenceFunc func() uint64 // GetSourceChannelFunc mocks the GetSourceChannel method. GetSourceChannelFunc func() string // GetSourcePortFunc mocks the GetSourcePort method. GetSourcePortFunc func() string // GetTimeoutHeightFunc mocks the GetTimeoutHeight method. GetTimeoutHeightFunc func() ibcexported.Height // GetTimeoutTimestampFunc mocks the GetTimeoutTimestamp method. GetTimeoutTimestampFunc func() uint64 // ValidateBasicFunc mocks the ValidateBasic method. ValidateBasicFunc func() error // contains filtered or unexported fields }
PacketIMock is a mock implementation of app.PacketI.
func TestSomethingThatUsesPacketI(t *testing.T) { // make and configure a mocked app.PacketI mockedPacketI := &PacketIMock{ GetDataFunc: func() []byte { panic("mock out the GetData method") }, GetDestChannelFunc: func() string { panic("mock out the GetDestChannel method") }, GetDestPortFunc: func() string { panic("mock out the GetDestPort method") }, GetSequenceFunc: func() uint64 { panic("mock out the GetSequence method") }, GetSourceChannelFunc: func() string { panic("mock out the GetSourceChannel method") }, GetSourcePortFunc: func() string { panic("mock out the GetSourcePort method") }, GetTimeoutHeightFunc: func() ibcexported.Height { panic("mock out the GetTimeoutHeight method") }, GetTimeoutTimestampFunc: func() uint64 { panic("mock out the GetTimeoutTimestamp method") }, ValidateBasicFunc: func() error { panic("mock out the ValidateBasic method") }, } // use mockedPacketI in code that requires app.PacketI // and then make assertions. }
func (*PacketIMock) GetDataCalls ¶
func (mock *PacketIMock) GetDataCalls() []struct { }
GetDataCalls gets all the calls that were made to GetData. Check the length with:
len(mockedPacketI.GetDataCalls())
func (*PacketIMock) GetDestChannel ¶
func (mock *PacketIMock) GetDestChannel() string
GetDestChannel calls GetDestChannelFunc.
func (*PacketIMock) GetDestChannelCalls ¶
func (mock *PacketIMock) GetDestChannelCalls() []struct { }
GetDestChannelCalls gets all the calls that were made to GetDestChannel. Check the length with:
len(mockedPacketI.GetDestChannelCalls())
func (*PacketIMock) GetDestPort ¶
func (mock *PacketIMock) GetDestPort() string
GetDestPort calls GetDestPortFunc.
func (*PacketIMock) GetDestPortCalls ¶
func (mock *PacketIMock) GetDestPortCalls() []struct { }
GetDestPortCalls gets all the calls that were made to GetDestPort. Check the length with:
len(mockedPacketI.GetDestPortCalls())
func (*PacketIMock) GetSequence ¶
func (mock *PacketIMock) GetSequence() uint64
GetSequence calls GetSequenceFunc.
func (*PacketIMock) GetSequenceCalls ¶
func (mock *PacketIMock) GetSequenceCalls() []struct { }
GetSequenceCalls gets all the calls that were made to GetSequence. Check the length with:
len(mockedPacketI.GetSequenceCalls())
func (*PacketIMock) GetSourceChannel ¶
func (mock *PacketIMock) GetSourceChannel() string
GetSourceChannel calls GetSourceChannelFunc.
func (*PacketIMock) GetSourceChannelCalls ¶
func (mock *PacketIMock) GetSourceChannelCalls() []struct { }
GetSourceChannelCalls gets all the calls that were made to GetSourceChannel. Check the length with:
len(mockedPacketI.GetSourceChannelCalls())
func (*PacketIMock) GetSourcePort ¶
func (mock *PacketIMock) GetSourcePort() string
GetSourcePort calls GetSourcePortFunc.
func (*PacketIMock) GetSourcePortCalls ¶
func (mock *PacketIMock) GetSourcePortCalls() []struct { }
GetSourcePortCalls gets all the calls that were made to GetSourcePort. Check the length with:
len(mockedPacketI.GetSourcePortCalls())
func (*PacketIMock) GetTimeoutHeight ¶
func (mock *PacketIMock) GetTimeoutHeight() ibcexported.Height
GetTimeoutHeight calls GetTimeoutHeightFunc.
func (*PacketIMock) GetTimeoutHeightCalls ¶
func (mock *PacketIMock) GetTimeoutHeightCalls() []struct { }
GetTimeoutHeightCalls gets all the calls that were made to GetTimeoutHeight. Check the length with:
len(mockedPacketI.GetTimeoutHeightCalls())
func (*PacketIMock) GetTimeoutTimestamp ¶
func (mock *PacketIMock) GetTimeoutTimestamp() uint64
GetTimeoutTimestamp calls GetTimeoutTimestampFunc.
func (*PacketIMock) GetTimeoutTimestampCalls ¶
func (mock *PacketIMock) GetTimeoutTimestampCalls() []struct { }
GetTimeoutTimestampCalls gets all the calls that were made to GetTimeoutTimestamp. Check the length with:
len(mockedPacketI.GetTimeoutTimestampCalls())
func (*PacketIMock) ValidateBasic ¶
func (mock *PacketIMock) ValidateBasic() error
ValidateBasic calls ValidateBasicFunc.
func (*PacketIMock) ValidateBasicCalls ¶
func (mock *PacketIMock) ValidateBasicCalls() []struct { }
ValidateBasicCalls gets all the calls that were made to ValidateBasic. Check the length with:
len(mockedPacketI.ValidateBasicCalls())