Documentation
¶
Index ¶
- type DynamicBuilderMock
- type InputPortMock
- func (mock *InputPortMock) Call(in1 *port.CallParams) (io.Reader, error)
- func (mock *InputPortMock) CallCalls() []struct{ ... }
- func (mock *InputPortMock) Describe(in1 *port.DescribeParams) (io.Reader, error)
- func (mock *InputPortMock) DescribeCalls() []struct{ ... }
- func (mock *InputPortMock) Header(in1 *port.HeaderParams) (io.Reader, error)
- func (mock *InputPortMock) HeaderCalls() []struct{ ... }
- func (mock *InputPortMock) Package(in1 *port.PackageParams) (io.Reader, error)
- func (mock *InputPortMock) PackageCalls() []struct{ ... }
- func (mock *InputPortMock) Service(in1 *port.ServiceParams) (io.Reader, error)
- func (mock *InputPortMock) ServiceCalls() []struct{ ... }
- func (mock *InputPortMock) Show(in1 *port.ShowParams) (io.Reader, error)
- func (mock *InputPortMock) ShowCalls() []struct{ ... }
- type InputterMock
- type OutputPortMock
- func (mock *OutputPortMock) Call(res proto.Message) (io.Reader, error)
- func (mock *OutputPortMock) CallCalls() []struct{ ... }
- func (mock *OutputPortMock) Describe(showable port.Showable) (io.Reader, error)
- func (mock *OutputPortMock) DescribeCalls() []struct{ ... }
- func (mock *OutputPortMock) Header() (io.Reader, error)
- func (mock *OutputPortMock) HeaderCalls() []struct{}
- func (mock *OutputPortMock) Package() (io.Reader, error)
- func (mock *OutputPortMock) PackageCalls() []struct{}
- func (mock *OutputPortMock) Service() (io.Reader, error)
- func (mock *OutputPortMock) ServiceCalls() []struct{}
- func (mock *OutputPortMock) Show(showable port.Showable) (io.Reader, error)
- func (mock *OutputPortMock) ShowCalls() []struct{ ... }
- type ShowableMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicBuilderMock ¶
type DynamicBuilderMock struct { // NewMessageFunc mocks the NewMessage method. NewMessageFunc func(m entity.Message) proto.Message // contains filtered or unexported fields }
DynamicBuilderMock is a mock implementation of DynamicBuilder.
func TestSomethingThatUsesDynamicBuilder(t *testing.T) { // make and configure a mocked DynamicBuilder mockedDynamicBuilder := &DynamicBuilderMock{ NewMessageFunc: func(m entity.Message) proto.Message { panic("TODO: mock out the NewMessage method") }, } // TODO: use mockedDynamicBuilder in code that requires DynamicBuilder // and then make assertions. }
func (*DynamicBuilderMock) NewMessage ¶
func (mock *DynamicBuilderMock) NewMessage(m entity.Message) proto.Message
NewMessage calls NewMessageFunc.
func (*DynamicBuilderMock) NewMessageCalls ¶
func (mock *DynamicBuilderMock) NewMessageCalls() []struct { M entity.Message }
NewMessageCalls gets all the calls that were made to NewMessage. Check the length with:
len(mockedDynamicBuilder.NewMessageCalls())
type InputPortMock ¶
type InputPortMock struct { // CallFunc mocks the Call method. CallFunc func(in1 *port.CallParams) (io.Reader, error) // DescribeFunc mocks the Describe method. DescribeFunc func(in1 *port.DescribeParams) (io.Reader, error) // HeaderFunc mocks the Header method. HeaderFunc func(in1 *port.HeaderParams) (io.Reader, error) // PackageFunc mocks the Package method. PackageFunc func(in1 *port.PackageParams) (io.Reader, error) // ServiceFunc mocks the Service method. ServiceFunc func(in1 *port.ServiceParams) (io.Reader, error) // ShowFunc mocks the Show method. ShowFunc func(in1 *port.ShowParams) (io.Reader, error) // contains filtered or unexported fields }
InputPortMock is a mock implementation of InputPort.
func TestSomethingThatUsesInputPort(t *testing.T) { // make and configure a mocked InputPort mockedInputPort := &InputPortMock{ CallFunc: func(in1 *port.CallParams) (io.Reader, error) { panic("TODO: mock out the Call method") }, DescribeFunc: func(in1 *port.DescribeParams) (io.Reader, error) { panic("TODO: mock out the Describe method") }, HeaderFunc: func(in1 *port.HeaderParams) (io.Reader, error) { panic("TODO: mock out the Header method") }, PackageFunc: func(in1 *port.PackageParams) (io.Reader, error) { panic("TODO: mock out the Package method") }, ServiceFunc: func(in1 *port.ServiceParams) (io.Reader, error) { panic("TODO: mock out the Service method") }, ShowFunc: func(in1 *port.ShowParams) (io.Reader, error) { panic("TODO: mock out the Show method") }, } // TODO: use mockedInputPort in code that requires InputPort // and then make assertions. }
func (*InputPortMock) Call ¶
func (mock *InputPortMock) Call(in1 *port.CallParams) (io.Reader, error)
Call calls CallFunc.
func (*InputPortMock) CallCalls ¶
func (mock *InputPortMock) CallCalls() []struct { In1 *port.CallParams }
CallCalls gets all the calls that were made to Call. Check the length with:
len(mockedInputPort.CallCalls())
func (*InputPortMock) Describe ¶
func (mock *InputPortMock) Describe(in1 *port.DescribeParams) (io.Reader, error)
Describe calls DescribeFunc.
func (*InputPortMock) DescribeCalls ¶
func (mock *InputPortMock) DescribeCalls() []struct { In1 *port.DescribeParams }
DescribeCalls gets all the calls that were made to Describe. Check the length with:
len(mockedInputPort.DescribeCalls())
func (*InputPortMock) Header ¶
func (mock *InputPortMock) Header(in1 *port.HeaderParams) (io.Reader, error)
Header calls HeaderFunc.
func (*InputPortMock) HeaderCalls ¶
func (mock *InputPortMock) HeaderCalls() []struct { In1 *port.HeaderParams }
HeaderCalls gets all the calls that were made to Header. Check the length with:
len(mockedInputPort.HeaderCalls())
func (*InputPortMock) Package ¶
func (mock *InputPortMock) Package(in1 *port.PackageParams) (io.Reader, error)
Package calls PackageFunc.
func (*InputPortMock) PackageCalls ¶
func (mock *InputPortMock) PackageCalls() []struct { In1 *port.PackageParams }
PackageCalls gets all the calls that were made to Package. Check the length with:
len(mockedInputPort.PackageCalls())
func (*InputPortMock) Service ¶
func (mock *InputPortMock) Service(in1 *port.ServiceParams) (io.Reader, error)
Service calls ServiceFunc.
func (*InputPortMock) ServiceCalls ¶
func (mock *InputPortMock) ServiceCalls() []struct { In1 *port.ServiceParams }
ServiceCalls gets all the calls that were made to Service. Check the length with:
len(mockedInputPort.ServiceCalls())
func (*InputPortMock) Show ¶
func (mock *InputPortMock) Show(in1 *port.ShowParams) (io.Reader, error)
Show calls ShowFunc.
func (*InputPortMock) ShowCalls ¶
func (mock *InputPortMock) ShowCalls() []struct { In1 *port.ShowParams }
ShowCalls gets all the calls that were made to Show. Check the length with:
len(mockedInputPort.ShowCalls())
type InputterMock ¶
type InputterMock struct { // InputFunc mocks the Input method. InputFunc func(reqMsg entity.Message) (proto.Message, error) // contains filtered or unexported fields }
InputterMock is a mock implementation of Inputter.
func TestSomethingThatUsesInputter(t *testing.T) { // make and configure a mocked Inputter mockedInputter := &InputterMock{ InputFunc: func(reqMsg entity.Message) (proto.Message, error) { panic("TODO: mock out the Input method") }, } // TODO: use mockedInputter in code that requires Inputter // and then make assertions. }
func (*InputterMock) InputCalls ¶
func (mock *InputterMock) InputCalls() []struct { ReqMsg entity.Message }
InputCalls gets all the calls that were made to Input. Check the length with:
len(mockedInputter.InputCalls())
type OutputPortMock ¶
type OutputPortMock struct { // CallFunc mocks the Call method. CallFunc func(res proto.Message) (io.Reader, error) // DescribeFunc mocks the Describe method. DescribeFunc func(showable port.Showable) (io.Reader, error) // HeaderFunc mocks the Header method. HeaderFunc func() (io.Reader, error) // PackageFunc mocks the Package method. PackageFunc func() (io.Reader, error) // ServiceFunc mocks the Service method. ServiceFunc func() (io.Reader, error) // ShowFunc mocks the Show method. ShowFunc func(showable port.Showable) (io.Reader, error) // contains filtered or unexported fields }
OutputPortMock is a mock implementation of OutputPort.
func TestSomethingThatUsesOutputPort(t *testing.T) { // make and configure a mocked OutputPort mockedOutputPort := &OutputPortMock{ CallFunc: func(res proto.Message) (io.Reader, error) { panic("TODO: mock out the Call method") }, DescribeFunc: func(showable port.Showable) (io.Reader, error) { panic("TODO: mock out the Describe method") }, HeaderFunc: func() (io.Reader, error) { panic("TODO: mock out the Header method") }, PackageFunc: func() (io.Reader, error) { panic("TODO: mock out the Package method") }, ServiceFunc: func() (io.Reader, error) { panic("TODO: mock out the Service method") }, ShowFunc: func(showable port.Showable) (io.Reader, error) { panic("TODO: mock out the Show method") }, } // TODO: use mockedOutputPort in code that requires OutputPort // and then make assertions. }
func (*OutputPortMock) CallCalls ¶
func (mock *OutputPortMock) CallCalls() []struct { Res proto.Message }
CallCalls gets all the calls that were made to Call. Check the length with:
len(mockedOutputPort.CallCalls())
func (*OutputPortMock) DescribeCalls ¶
func (mock *OutputPortMock) DescribeCalls() []struct { Showable port.Showable }
DescribeCalls gets all the calls that were made to Describe. Check the length with:
len(mockedOutputPort.DescribeCalls())
func (*OutputPortMock) Header ¶
func (mock *OutputPortMock) Header() (io.Reader, error)
Header calls HeaderFunc.
func (*OutputPortMock) HeaderCalls ¶
func (mock *OutputPortMock) HeaderCalls() []struct { }
HeaderCalls gets all the calls that were made to Header. Check the length with:
len(mockedOutputPort.HeaderCalls())
func (*OutputPortMock) Package ¶
func (mock *OutputPortMock) Package() (io.Reader, error)
Package calls PackageFunc.
func (*OutputPortMock) PackageCalls ¶
func (mock *OutputPortMock) PackageCalls() []struct { }
PackageCalls gets all the calls that were made to Package. Check the length with:
len(mockedOutputPort.PackageCalls())
func (*OutputPortMock) Service ¶
func (mock *OutputPortMock) Service() (io.Reader, error)
Service calls ServiceFunc.
func (*OutputPortMock) ServiceCalls ¶
func (mock *OutputPortMock) ServiceCalls() []struct { }
ServiceCalls gets all the calls that were made to Service. Check the length with:
len(mockedOutputPort.ServiceCalls())
func (*OutputPortMock) ShowCalls ¶
func (mock *OutputPortMock) ShowCalls() []struct { Showable port.Showable }
ShowCalls gets all the calls that were made to Show. Check the length with:
len(mockedOutputPort.ShowCalls())
type ShowableMock ¶
type ShowableMock struct { // ShowFunc mocks the Show method. ShowFunc func() string // contains filtered or unexported fields }
ShowableMock is a mock implementation of Showable.
func TestSomethingThatUsesShowable(t *testing.T) { // make and configure a mocked Showable mockedShowable := &ShowableMock{ ShowFunc: func() string { panic("TODO: mock out the Show method") }, } // TODO: use mockedShowable in code that requires Showable // and then make assertions. }
func (*ShowableMock) ShowCalls ¶
func (mock *ShowableMock) ShowCalls() []struct { }
ShowCalls gets all the calls that were made to Show. Check the length with:
len(mockedShowable.ShowCalls())