mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) GetStarGazers

func (_m *Client) GetStarGazers(ctx context.Context, repository *github.Repository) ([]*github.Stargazer, error)

GetStarGazers provides a mock function with given fields: ctx, repository

func (*Client) GetUserRepos

func (_m *Client) GetUserRepos(ctx context.Context, user string) iter.Seq2[*github.Repository, error]

GetUserRepos provides a mock function with given fields: ctx, user

type Client_Expecter

type Client_Expecter struct {
	// contains filtered or unexported fields
}

func (*Client_Expecter) GetStarGazers

func (_e *Client_Expecter) GetStarGazers(ctx interface{}, repository interface{}) *Client_GetStarGazers_Call

GetStarGazers is a helper method to define mock.On call

  • ctx context.Context
  • repository *github.Repository

func (*Client_Expecter) GetUserRepos

func (_e *Client_Expecter) GetUserRepos(ctx interface{}, user interface{}) *Client_GetUserRepos_Call

GetUserRepos is a helper method to define mock.On call

  • ctx context.Context
  • user string

type Client_GetStarGazers_Call

type Client_GetStarGazers_Call struct {
	*mock.Call
}

Client_GetStarGazers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStarGazers'

func (*Client_GetStarGazers_Call) Return

func (*Client_GetStarGazers_Call) Run

func (*Client_GetStarGazers_Call) RunAndReturn

type Client_GetUserRepos_Call

type Client_GetUserRepos_Call struct {
	*mock.Call
}

Client_GetUserRepos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserRepos'

func (*Client_GetUserRepos_Call) Return

func (*Client_GetUserRepos_Call) Run

func (*Client_GetUserRepos_Call) RunAndReturn

type Notifier

type Notifier struct {
	mock.Mock
}

Notifier is an autogenerated mock type for the Notifier type

func NewNotifier

func NewNotifier(t interface {
	mock.TestingT
	Cleanup(func())
}) *Notifier

NewNotifier creates a new instance of Notifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Notifier) EXPECT

func (_m *Notifier) EXPECT() *Notifier_Expecter

func (*Notifier) Notify

func (_m *Notifier) Notify(repository *github.Repository, gazers []*github.Stargazer, added bool)

Notify provides a mock function with given fields: repository, gazers, added

type Notifier_Expecter

type Notifier_Expecter struct {
	// contains filtered or unexported fields
}

func (*Notifier_Expecter) Notify

func (_e *Notifier_Expecter) Notify(repository interface{}, gazers interface{}, added interface{}) *Notifier_Notify_Call

Notify is a helper method to define mock.On call

  • repository *github.Repository
  • gazers []*github.Stargazer
  • added bool

type Notifier_Notify_Call

type Notifier_Notify_Call struct {
	*mock.Call
}

Notifier_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify'

func (*Notifier_Notify_Call) Return

func (*Notifier_Notify_Call) Run

func (_c *Notifier_Notify_Call) Run(run func(repository *github.Repository, gazers []*github.Stargazer, added bool)) *Notifier_Notify_Call

func (*Notifier_Notify_Call) RunAndReturn

func (_c *Notifier_Notify_Call) RunAndReturn(run func(*github.Repository, []*github.Stargazer, bool)) *Notifier_Notify_Call

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Store) Add

func (_m *Store) Add(repo *github.Repository, stargazer *github.Stargazer) (bool, error)

Add provides a mock function with given fields: repo, stargazer

func (*Store) Delete

func (_m *Store) Delete(repo *github.Repository, stargazer *github.Stargazer) (bool, error)

Delete provides a mock function with given fields: repo, stargazer

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) SetStargazers

func (_m *Store) SetStargazers(repository *github.Repository, stargazers []*github.Stargazer) ([]*github.Stargazer, error)

SetStargazers provides a mock function with given fields: repository, stargazers

type Store_Add_Call

type Store_Add_Call struct {
	*mock.Call
}

Store_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*Store_Add_Call) Return

func (_c *Store_Add_Call) Return(_a0 bool, _a1 error) *Store_Add_Call

func (*Store_Add_Call) Run

func (_c *Store_Add_Call) Run(run func(repo *github.Repository, stargazer *github.Stargazer)) *Store_Add_Call

func (*Store_Add_Call) RunAndReturn

func (_c *Store_Add_Call) RunAndReturn(run func(*github.Repository, *github.Stargazer) (bool, error)) *Store_Add_Call

type Store_Delete_Call

type Store_Delete_Call struct {
	*mock.Call
}

Store_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*Store_Delete_Call) Return

func (_c *Store_Delete_Call) Return(_a0 bool, _a1 error) *Store_Delete_Call

func (*Store_Delete_Call) Run

func (_c *Store_Delete_Call) Run(run func(repo *github.Repository, stargazer *github.Stargazer)) *Store_Delete_Call

func (*Store_Delete_Call) RunAndReturn

func (_c *Store_Delete_Call) RunAndReturn(run func(*github.Repository, *github.Stargazer) (bool, error)) *Store_Delete_Call

type Store_Expecter

type Store_Expecter struct {
	// contains filtered or unexported fields
}

func (*Store_Expecter) Add

func (_e *Store_Expecter) Add(repo interface{}, stargazer interface{}) *Store_Add_Call

Add is a helper method to define mock.On call

  • repo *github.Repository
  • stargazer *github.Stargazer

func (*Store_Expecter) Delete

func (_e *Store_Expecter) Delete(repo interface{}, stargazer interface{}) *Store_Delete_Call

Delete is a helper method to define mock.On call

  • repo *github.Repository
  • stargazer *github.Stargazer

func (*Store_Expecter) SetStargazers

func (_e *Store_Expecter) SetStargazers(repository interface{}, stargazers interface{}) *Store_SetStargazers_Call

SetStargazers is a helper method to define mock.On call

  • repository *github.Repository
  • stargazers []*github.Stargazer

type Store_SetStargazers_Call

type Store_SetStargazers_Call struct {
	*mock.Call
}

Store_SetStargazers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStargazers'

func (*Store_SetStargazers_Call) Return

func (*Store_SetStargazers_Call) Run

func (_c *Store_SetStargazers_Call) Run(run func(repository *github.Repository, stargazers []*github.Stargazer)) *Store_SetStargazers_Call

func (*Store_SetStargazers_Call) RunAndReturn

Jump to

Keyboard shortcuts

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