mocks

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

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

Scheduler is an autogenerated mock type for the Scheduler type

func NewScheduler

func NewScheduler[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *Scheduler[T]

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

func (_m *Scheduler[T]) EXPECT() *Scheduler_Expecter[T]

func (*Scheduler[T]) Run

func (_m *Scheduler[T]) Run(ctx context.Context) error

Run provides a mock function with given fields: ctx

func (*Scheduler[T]) ScheduleJob

func (_m *Scheduler[T]) ScheduleJob(key string, provider func() (T, error)) (T, error)

ScheduleJob provides a mock function with given fields: key, provider

type Scheduler_Expecter

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

func (*Scheduler_Expecter[T]) Run

func (_e *Scheduler_Expecter[T]) Run(ctx interface{}) *Scheduler_Run_Call[T]

Run is a helper method to define mock.On call

  • ctx context.Context

func (*Scheduler_Expecter[T]) ScheduleJob

func (_e *Scheduler_Expecter[T]) ScheduleJob(key interface{}, provider interface{}) *Scheduler_ScheduleJob_Call[T]

ScheduleJob is a helper method to define mock.On call

  • key string
  • provider func()(T , error)

type Scheduler_Run_Call

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

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

func (*Scheduler_Run_Call[T]) Return

func (_c *Scheduler_Run_Call[T]) Return(_a0 error) *Scheduler_Run_Call[T]

func (*Scheduler_Run_Call[T]) Run

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

func (*Scheduler_Run_Call[T]) RunAndReturn

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

type Scheduler_ScheduleJob_Call

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

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

func (*Scheduler_ScheduleJob_Call[T]) Return

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

func (*Scheduler_ScheduleJob_Call[T]) Run

func (_c *Scheduler_ScheduleJob_Call[T]) Run(run func(key string, provider func() (T, error))) *Scheduler_ScheduleJob_Call[T]

func (*Scheduler_ScheduleJob_Call[T]) RunAndReturn

func (_c *Scheduler_ScheduleJob_Call[T]) RunAndReturn(run func(string, func() (T, error)) (T, error)) *Scheduler_ScheduleJob_Call[T]

Jump to

Keyboard shortcuts

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