Documentation
¶
Overview ¶
Package mocks provides mock implementations of interfaces used in testing
Index ¶
- type MockGitHubClient
- func (m *MockGitHubClient) Do(_ string, _ map[string]interface{}, response interface{}) error
- func (m *MockGitHubClient) FetchContributions(username string, year int) (*types.ContributionsResponse, error)
- func (m *MockGitHubClient) GetAuthenticatedUser() (string, error)
- func (m *MockGitHubClient) GetUserJoinYear(_ string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockGitHubClient ¶
type MockGitHubClient struct {
Username string
JoinYear int
MockData *types.ContributionsResponse
Response interface{} // Generic response field for testing
Err error // Error to return if needed
}
MockGitHubClient implements both GitHubClientInterface and APIClient interfaces
func (*MockGitHubClient) Do ¶
func (m *MockGitHubClient) Do(_ string, _ map[string]interface{}, response interface{}) error
Do implements APIClient
func (*MockGitHubClient) FetchContributions ¶
func (m *MockGitHubClient) FetchContributions(username string, year int) (*types.ContributionsResponse, error)
FetchContributions implements GitHubClientInterface
func (*MockGitHubClient) GetAuthenticatedUser ¶
func (m *MockGitHubClient) GetAuthenticatedUser() (string, error)
GetAuthenticatedUser implements GitHubClientInterface
func (*MockGitHubClient) GetUserJoinYear ¶
func (m *MockGitHubClient) GetUserJoinYear(_ string) (int, error)
GetUserJoinYear implements GitHubClientInterface
Click to show internal directories.
Click to hide internal directories.