Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Method( *myType, [3]json.Number, []byte, map[sql.NullString]io.Reader, func(conn net.Conn), Go, chan *httputil.BufferPool, struct{ URL *url.URL }, interface { fmt.Stringer CookieJar() http.CookieJar }, ) }
Interface is a test interface.
type InterfaceMock ¶
type InterfaceMock struct { // MethodFunc mocks the Method method. MethodFunc func(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{ URL *url.URL }, ifaceVal interface { CookieJar() http.CookieJar fmt.Stringer }) // contains filtered or unexported fields }
InterfaceMock is a mock implementation of Interface.
func TestSomethingThatUsesInterface(t *testing.T) { // make and configure a mocked Interface mockedInterface := &InterfaceMock{ MethodFunc: func(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{URL *url.URL}, ifaceVal interface{CookieJar() http.CookieJar; fmt.Stringer}) { panic("mock out the Method method") }, } // use mockedInterface in code that requires Interface // and then make assertions. }
func (*InterfaceMock) Method ¶
func (mock *InterfaceMock) Method(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{ URL *url.URL }, ifaceVal interface { CookieJar() http.CookieJar fmt.Stringer })
Method calls MethodFunc.
func (*InterfaceMock) MethodCalls ¶
func (mock *InterfaceMock) MethodCalls() []struct { MyTypeMoqParam *myType Numbers [3]json.Number Bytes []byte NullStringToReader map[sql.NullString]io.Reader Fn func(conn net.Conn) GoMoqParam Go BufferPoolCh chan *httputil.BufferPool Val struct{ URL *url.URL } IfaceVal interface { CookieJar() http.CookieJar fmt.Stringer } }
MethodCalls gets all the calls that were made to Method. Check the length with:
len(mockedInterface.MethodCalls())
Click to show internal directories.
Click to hide internal directories.