Documentation ¶
Overview ¶
Package mock provides a mock client to be used in testing. It can allow tests using the Client or Factory interfaces to be tested without making real network connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockRobotsResponse ¶
func ResponseFromString ¶
Types ¶
type MockClient ¶
type MockClient struct { ForeverResponse *http.Response NextResponse *http.Response Requests []*url.URL Redir *url.URL CheckRedirect func(*http.Request, []*http.Request) error }
func (*MockClient) RequestURL ¶
func (*MockClient) SetCheckRedirect ¶
type MockClientFactory ¶
type MockClientFactory struct { ForeverClient *MockClient NextClient *MockClient }
func (*MockClientFactory) Get ¶
func (f *MockClientFactory) Get() client.Client
Click to show internal directories.
Click to hide internal directories.