Documentation
¶
Index ¶
- type Mock
- func (m *Mock) Anything() anything
- func (m *Mock) FromStage(fn interface{}, resultPtr ...interface{})
- func (m *Mock) LastCalledWith(fn interface{}, args ...interface{}) error
- func (m *Mock) OfType() ofType
- func (m *Mock) Reset()
- func (m *Mock) ResetCalls()
- func (m *Mock) Stage(fn interface{}, result ...interface{})
- func (m *Mock) TimeRange(duration time.Duration) mockTime
- func (m *Mock) Trace(fn interface{}, args ...interface{})
- func (m *Mock) WasCalledNTimes(fn interface{}, n int) error
- func (m *Mock) WasCalledWith(fn interface{}, args ...interface{}) error
- type MockServer
- func (s *MockServer) Addr() string
- func (s *MockServer) LastRequest() *http.Request
- func (s *MockServer) MockCallback(path string, res http.HandlerFunc)
- func (s *MockServer) MockResponse(method, path string, status int, body io.Reader, headers map[string]string)
- func (s *MockServer) ResetCalls()
- func (s *MockServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (s *MockServer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
func (*Mock) LastCalledWith ¶
func (*Mock) ResetCalls ¶
func (m *Mock) ResetCalls()
func (*Mock) WasCalledNTimes ¶
func (*Mock) WasCalledWith ¶
type MockServer ¶
type MockServer struct {
// contains filtered or unexported fields
}
func NewMockServer ¶
func NewMockServer(addr string) (s *MockServer, err error)
func (*MockServer) Addr ¶
func (s *MockServer) Addr() string
func (*MockServer) LastRequest ¶
func (s *MockServer) LastRequest() *http.Request
func (*MockServer) MockCallback ¶
func (s *MockServer) MockCallback(path string, res http.HandlerFunc)
func (*MockServer) MockResponse ¶
func (*MockServer) ResetCalls ¶
func (s *MockServer) ResetCalls()
func (*MockServer) ServeHTTP ¶
func (s *MockServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*MockServer) Stop ¶
func (s *MockServer) Stop()
Click to show internal directories.
Click to hide internal directories.