Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrappedReaderMock ¶
type WrappedReaderMock struct { // ReadFunc mocks the Read method. ReadFunc func(p []byte) (int, error) // contains filtered or unexported fields }
WrappedReaderMock is a mock implementation of reader.WrappedReader.
func TestSomethingThatUsesWrappedReader(t *testing.T) { // make and configure a mocked reader.WrappedReader mockedWrappedReader := &WrappedReaderMock{ ReadFunc: func(p []byte) (int, error) { panic("mock out the Read method") }, } // use mockedWrappedReader in code that requires reader.WrappedReader // and then make assertions. }
func (*WrappedReaderMock) Read ¶
func (mock *WrappedReaderMock) Read(p []byte) (int, error)
Read calls ReadFunc.
func (*WrappedReaderMock) ReadCalls ¶
func (mock *WrappedReaderMock) ReadCalls() []struct { P []byte }
ReadCalls gets all the calls that were made to Read. Check the length with:
len(mockedWrappedReader.ReadCalls())
Click to show internal directories.
Click to hide internal directories.