mocks

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 3 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 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 MockTimerDelegate

type MockTimerDelegate struct {
	mock.Mock
}

MockTimerDelegate is an autogenerated mock type for the Delegate type

func NewMockTimerDelegate

func NewMockTimerDelegate(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTimerDelegate

NewMockTimerDelegate creates a new instance of MockTimerDelegate. 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 (*MockTimerDelegate) EXPECT

func (*MockTimerDelegate) Reset

func (_m *MockTimerDelegate) Reset(d time.Duration) bool

Reset provides a mock function with given fields: d

func (*MockTimerDelegate) Stop

func (_m *MockTimerDelegate) Stop() bool

Stop provides a mock function with given fields:

type MockTimerDelegate_Expecter

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

func (*MockTimerDelegate_Expecter) Reset

func (_e *MockTimerDelegate_Expecter) Reset(d interface{}) *MockTimerDelegate_Reset_Call

Reset is a helper method to define mock.On call

  • d time.Duration

func (*MockTimerDelegate_Expecter) Stop

Stop is a helper method to define mock.On call

type MockTimerDelegate_Reset_Call

type MockTimerDelegate_Reset_Call struct {
	*mock.Call
}

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

func (*MockTimerDelegate_Reset_Call) Return

func (*MockTimerDelegate_Reset_Call) Run

func (*MockTimerDelegate_Reset_Call) RunAndReturn

type MockTimerDelegate_Stop_Call

type MockTimerDelegate_Stop_Call struct {
	*mock.Call
}

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

func (*MockTimerDelegate_Stop_Call) Return

func (*MockTimerDelegate_Stop_Call) Run

func (*MockTimerDelegate_Stop_Call) RunAndReturn

func (_c *MockTimerDelegate_Stop_Call) RunAndReturn(run func() bool) *MockTimerDelegate_Stop_Call

Jump to

Keyboard shortcuts

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