Documentation ¶
Index ¶
- type MockServer
- func (m *MockServer) ExpectCalled(c *C, expectCalled bool, path string)
- func (m *MockServer) ExpectError(c *C, err error, path, expectedErrorString string)
- func (m *MockServer) Start(c *C) *MockServer
- func (m *MockServer) Stop()
- func (m *MockServer) WithBody(body string) *MockServer
- func (m *MockServer) WithHeader(key, value string) *MockServer
- func (m *MockServer) WithResponseCode(code int) *MockServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockServer ¶
type MockServer struct { HandlerCalled bool Body string ResponseCode int Server *httptest.Server URL string CapturedPath string CapturedBody string Headers map[string]string }
func NewMockServer ¶
func NewMockServer() *MockServer
func (*MockServer) ExpectCalled ¶
func (m *MockServer) ExpectCalled(c *C, expectCalled bool, path string)
func (*MockServer) ExpectError ¶
func (m *MockServer) ExpectError(c *C, err error, path, expectedErrorString string)
func (*MockServer) Start ¶
func (m *MockServer) Start(c *C) *MockServer
func (*MockServer) Stop ¶
func (m *MockServer) Stop()
func (*MockServer) WithBody ¶
func (m *MockServer) WithBody(body string) *MockServer
func (*MockServer) WithHeader ¶
func (m *MockServer) WithHeader(key, value string) *MockServer
func (*MockServer) WithResponseCode ¶
func (m *MockServer) WithResponseCode(code int) *MockServer
Click to show internal directories.
Click to hide internal directories.