Documentation
¶
Index ¶
- Constants
- type MockedClient
- func (m *MockedClient) AllExpectationsDone() error
- func (m *MockedClient) ExpectGet(url string, err error, response *http.Response, headers map[string]string)
- func (m *MockedClient) ExpectPost(url string, body []byte, err error, response *http.Response, ...)
- func (m *MockedClient) Get(ctx context.Context, url string, headers map[string]string) (*http.Response, error)
- func (m *MockedClient) Post(ctx context.Context, url string, body []byte, headers map[string]string) (*http.Response, error)
- func (m *MockedClient) Reset()
Constants ¶
View Source
const ( ERR_Unexpected_Url = "call %q expected url %q, got %q" ERR_Unexpected_Data = "call %q expected data %v, got %v" ERR_Unexpected_Headers = "call %q expected headers %v, got %v" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockedClient ¶
type MockedClient struct {
// contains filtered or unexported fields
}
func (*MockedClient) AllExpectationsDone ¶
func (m *MockedClient) AllExpectationsDone() error
Check if all expected calls were done
func (*MockedClient) ExpectGet ¶
func (m *MockedClient) ExpectGet(url string, err error, response *http.Response, headers map[string]string)
Store expected call of Get method with expected data and error
func (*MockedClient) ExpectPost ¶
func (m *MockedClient) ExpectPost(url string, body []byte, err error, response *http.Response, headers map[string]string)
Store expected call of Post method with expected data and error
func (*MockedClient) Get ¶
func (m *MockedClient) Get(ctx context.Context, url string, headers map[string]string) (*http.Response, error)
Check if call of Get method was expected and returning expected response and error
Click to show internal directories.
Click to hide internal directories.