mocks

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mocks provides mock implementations of interfaces used in testing

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL