mocks

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher[T interface{}] struct {
	mock.Mock
}

Fetcher is an autogenerated mock type for the Fetcher type

func NewFetcher

func NewFetcher[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *Fetcher[T]

NewFetcher creates a new instance of Fetcher. 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 (*Fetcher[T]) EXPECT

func (_m *Fetcher[T]) EXPECT() *Fetcher_Expecter[T]

func (*Fetcher[T]) Fetch

func (_m *Fetcher[T]) Fetch(ctx context.Context) (T, error)

Fetch provides a mock function with given fields: ctx

func (*Fetcher[T]) GetLastModified

func (_m *Fetcher[T]) GetLastModified(ctx context.Context) (time.Time, error)

GetLastModified provides a mock function with given fields: ctx

type Fetcher_Expecter

type Fetcher_Expecter[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*Fetcher_Expecter[T]) Fetch

func (_e *Fetcher_Expecter[T]) Fetch(ctx interface{}) *Fetcher_Fetch_Call[T]

Fetch is a helper method to define mock.On call

  • ctx context.Context

func (*Fetcher_Expecter[T]) GetLastModified

func (_e *Fetcher_Expecter[T]) GetLastModified(ctx interface{}) *Fetcher_GetLastModified_Call[T]

GetLastModified is a helper method to define mock.On call

  • ctx context.Context

type Fetcher_Fetch_Call

type Fetcher_Fetch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*Fetcher_Fetch_Call[T]) Return

func (_c *Fetcher_Fetch_Call[T]) Return(_a0 T, _a1 error) *Fetcher_Fetch_Call[T]

func (*Fetcher_Fetch_Call[T]) Run

func (_c *Fetcher_Fetch_Call[T]) Run(run func(ctx context.Context)) *Fetcher_Fetch_Call[T]

func (*Fetcher_Fetch_Call[T]) RunAndReturn

func (_c *Fetcher_Fetch_Call[T]) RunAndReturn(run func(context.Context) (T, error)) *Fetcher_Fetch_Call[T]

type Fetcher_GetLastModified_Call

type Fetcher_GetLastModified_Call[T interface{}] struct {
	*mock.Call
}

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

func (*Fetcher_GetLastModified_Call[T]) Return

func (*Fetcher_GetLastModified_Call[T]) Run

func (*Fetcher_GetLastModified_Call[T]) RunAndReturn

Jump to

Keyboard shortcuts

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