mocks

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mocks contains generated test code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchProcessor added in v0.3.0

type BatchProcessor[QQ, RR any] interface {
	ProcessJobs(jobs QQ) (RR, error)
}

BatchProcessor for testing.

type MockBatchProcessor

type MockBatchProcessor[QQ interface{}, RR interface{}] struct {
	mock.Mock
}

MockBatchProcessor is an autogenerated mock type for the BatchProcessor type

func NewMockBatchProcessor

func NewMockBatchProcessor[QQ interface{}, RR interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBatchProcessor[QQ, RR]

NewMockBatchProcessor creates a new instance of MockBatchProcessor. 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 (*MockBatchProcessor[QQ, RR]) EXPECT

func (_m *MockBatchProcessor[QQ, RR]) EXPECT() *MockBatchProcessor_Expecter[QQ, RR]

func (*MockBatchProcessor[QQ, RR]) ProcessJobs

func (_m *MockBatchProcessor[QQ, RR]) ProcessJobs(jobs QQ) (RR, error)

ProcessJobs provides a mock function with given fields: jobs

type MockBatchProcessor_Expecter

type MockBatchProcessor_Expecter[QQ interface{}, RR interface{}] struct {
	// contains filtered or unexported fields
}

func (*MockBatchProcessor_Expecter[QQ, RR]) ProcessJobs

func (_e *MockBatchProcessor_Expecter[QQ, RR]) ProcessJobs(jobs interface{}) *MockBatchProcessor_ProcessJobs_Call[QQ, RR]

ProcessJobs is a helper method to define mock.On call

  • jobs QQ

type MockBatchProcessor_ProcessJobs_Call

type MockBatchProcessor_ProcessJobs_Call[QQ interface{}, RR interface{}] struct {
	*mock.Call
}

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

func (*MockBatchProcessor_ProcessJobs_Call[QQ, RR]) Return

func (_c *MockBatchProcessor_ProcessJobs_Call[QQ, RR]) Return(_a0 RR, _a1 error) *MockBatchProcessor_ProcessJobs_Call[QQ, RR]

func (*MockBatchProcessor_ProcessJobs_Call[QQ, RR]) Run

func (_c *MockBatchProcessor_ProcessJobs_Call[QQ, RR]) Run(run func(jobs QQ)) *MockBatchProcessor_ProcessJobs_Call[QQ, RR]

func (*MockBatchProcessor_ProcessJobs_Call[QQ, RR]) RunAndReturn

func (_c *MockBatchProcessor_ProcessJobs_Call[QQ, RR]) RunAndReturn(run func(QQ) (RR, error)) *MockBatchProcessor_ProcessJobs_Call[QQ, RR]

type MockNewTimer added in v0.4.0

type MockNewTimer struct {
	mock.Mock
}

MockNewTimer is an autogenerated mock type for the NewTimer type

func NewMockNewTimer added in v0.4.0

func NewMockNewTimer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockNewTimer

NewMockNewTimer creates a new instance of MockNewTimer. 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 (*MockNewTimer) EXPECT added in v0.4.0

func (_m *MockNewTimer) EXPECT() *MockNewTimer_Expecter

func (*MockNewTimer) New added in v0.4.0

func (_m *MockNewTimer) New(d time.Duration, f func(*bool)) timer.Timer

New provides a mock function with given fields: d, f

type MockNewTimer_Expecter added in v0.4.0

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

func (*MockNewTimer_Expecter) New added in v0.4.0

func (_e *MockNewTimer_Expecter) New(d interface{}, f interface{}) *MockNewTimer_New_Call

New is a helper method to define mock.On call

  • d time.Duration
  • f func(*bool)

type MockNewTimer_New_Call added in v0.4.0

type MockNewTimer_New_Call struct {
	*mock.Call
}

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

func (*MockNewTimer_New_Call) Return added in v0.4.0

func (*MockNewTimer_New_Call) Run added in v0.4.0

func (_c *MockNewTimer_New_Call) Run(run func(d time.Duration, f func(*bool))) *MockNewTimer_New_Call

func (*MockNewTimer_New_Call) RunAndReturn added in v0.4.0

func (_c *MockNewTimer_New_Call) RunAndReturn(run func(time.Duration, func(*bool)) timer.Timer) *MockNewTimer_New_Call

type MockProcessor

type MockProcessor[Q interface{}, R interface{}] struct {
	mock.Mock
}

MockProcessor is an autogenerated mock type for the Processor type

func NewMockProcessor

func NewMockProcessor[Q interface{}, R interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProcessor[Q, R]

NewMockProcessor creates a new instance of MockProcessor. 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 (*MockProcessor[Q, R]) EXPECT

func (_m *MockProcessor[Q, R]) EXPECT() *MockProcessor_Expecter[Q, R]

func (*MockProcessor[Q, R]) Process

func (_m *MockProcessor[Q, R]) Process(requests []types.BatchRequest[Q, R])

Process provides a mock function with given fields: requests

type MockProcessor_Expecter

type MockProcessor_Expecter[Q interface{}, R interface{}] struct {
	// contains filtered or unexported fields
}

func (*MockProcessor_Expecter[Q, R]) Process

func (_e *MockProcessor_Expecter[Q, R]) Process(requests interface{}) *MockProcessor_Process_Call[Q, R]

Process is a helper method to define mock.On call

  • requests []types.BatchRequest[Q,R]

type MockProcessor_Process_Call

type MockProcessor_Process_Call[Q interface{}, R interface{}] struct {
	*mock.Call
}

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

func (*MockProcessor_Process_Call[Q, R]) Return

func (_c *MockProcessor_Process_Call[Q, R]) Return() *MockProcessor_Process_Call[Q, R]

func (*MockProcessor_Process_Call[Q, R]) Run

func (_c *MockProcessor_Process_Call[Q, R]) Run(run func(requests []types.BatchRequest[Q, R])) *MockProcessor_Process_Call[Q, R]

func (*MockProcessor_Process_Call[Q, R]) RunAndReturn

func (_c *MockProcessor_Process_Call[Q, R]) RunAndReturn(run func([]types.BatchRequest[Q, R])) *MockProcessor_Process_Call[Q, R]

type MockTimer added in v0.4.0

type MockTimer struct {
	mock.Mock
}

MockTimer is an autogenerated mock type for the Timer type

func NewMockTimer added in v0.4.0

func NewMockTimer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTimer

NewMockTimer creates a new instance of MockTimer. 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 (*MockTimer) EXPECT added in v0.4.0

func (_m *MockTimer) EXPECT() *MockTimer_Expecter

func (*MockTimer) Stop added in v0.4.0

func (_m *MockTimer) Stop()

Stop provides a mock function with given fields:

type MockTimer_Expecter added in v0.4.0

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

func (*MockTimer_Expecter) Stop added in v0.4.0

Stop is a helper method to define mock.On call

type MockTimer_Stop_Call added in v0.4.0

type MockTimer_Stop_Call struct {
	*mock.Call
}

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

func (*MockTimer_Stop_Call) Return added in v0.4.0

func (*MockTimer_Stop_Call) Run added in v0.4.0

func (_c *MockTimer_Stop_Call) Run(run func()) *MockTimer_Stop_Call

func (*MockTimer_Stop_Call) RunAndReturn added in v0.4.0

func (_c *MockTimer_Stop_Call) RunAndReturn(run func()) *MockTimer_Stop_Call

type NewTimer added in v0.4.0

type NewTimer interface {
	New(d time.Duration, f func(sent *bool)) timer.Timer
}

NewTimer for testing.

type Processor added in v0.4.0

type Processor[Q, R any] interface {
	Process(requests []internal.BatchRequest[Q, R])
}

Processor defines the interface for processing batches of requests.

Jump to

Keyboard shortcuts

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