mocker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 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 MockActionExecutorCreator

type MockActionExecutorCreator struct {
	mock.Mock
}

MockActionExecutorCreator is an autogenerated mock type for the ActionExecutorCreator type

func NewMockActionExecutorCreator

func NewMockActionExecutorCreator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockActionExecutorCreator

NewMockActionExecutorCreator creates a new instance of MockActionExecutorCreator. 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 (*MockActionExecutorCreator) CreateExecutor

func (_m *MockActionExecutorCreator) CreateExecutor(action *domain.HookAction, hookDef *domain.HookDefinition) (domain.EventHandler, error)

CreateExecutor provides a mock function with given fields: action, hookDef

func (*MockActionExecutorCreator) EXPECT

type MockActionExecutorCreator_CreateExecutor_Call

type MockActionExecutorCreator_CreateExecutor_Call struct {
	*mock.Call
}

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

func (*MockActionExecutorCreator_CreateExecutor_Call) Return

func (*MockActionExecutorCreator_CreateExecutor_Call) Run

type MockActionExecutorCreator_Expecter

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

func (*MockActionExecutorCreator_Expecter) CreateExecutor

func (_e *MockActionExecutorCreator_Expecter) CreateExecutor(action interface{}, hookDef interface{}) *MockActionExecutorCreator_CreateExecutor_Call

CreateExecutor is a helper method to define mock.On call

  • action *domain.HookAction
  • hookDef *domain.HookDefinition

type MockEventHandler

type MockEventHandler struct {
	mock.Mock
}

MockEventHandler is an autogenerated mock type for the EventHandler type

func NewMockEventHandler

func NewMockEventHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEventHandler

NewMockEventHandler creates a new instance of MockEventHandler. 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 (*MockEventHandler) AssertNextHandlerCalled

func (next *MockEventHandler) AssertNextHandlerCalled(t *testing.T, ev *domain.Event, number int)

AssertNextHandlerCalled asserts the Handle method of handler was called.

func (*MockEventHandler) AssertNextHandlerNotCalled

func (next *MockEventHandler) AssertNextHandlerNotCalled(t *testing.T, ev *domain.Event)

func (*MockEventHandler) Destroy

func (_m *MockEventHandler) Destroy()

Destroy provides a mock function with given fields:

func (*MockEventHandler) EXPECT

func (*MockEventHandler) GetNext

func (_m *MockEventHandler) GetNext() domain.EventHandler

GetNext provides a mock function with given fields:

func (*MockEventHandler) Handle

func (_m *MockEventHandler) Handle(event *domain.Event)

Handle provides a mock function with given fields: event

func (*MockEventHandler) SetNext

func (_m *MockEventHandler) SetNext(next domain.EventHandler)

SetNext provides a mock function with given fields: next

type MockEventHandler_Destroy_Call

type MockEventHandler_Destroy_Call struct {
	*mock.Call
}

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

func (*MockEventHandler_Destroy_Call) Return

func (*MockEventHandler_Destroy_Call) Run

func (*MockEventHandler_Destroy_Call) RunAndReturn

func (_c *MockEventHandler_Destroy_Call) RunAndReturn(run func()) *MockEventHandler_Destroy_Call

type MockEventHandler_Expecter

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

func (*MockEventHandler_Expecter) Destroy

Destroy is a helper method to define mock.On call

func (*MockEventHandler_Expecter) GetNext

GetNext is a helper method to define mock.On call

func (*MockEventHandler_Expecter) Handle

func (_e *MockEventHandler_Expecter) Handle(event interface{}) *MockEventHandler_Handle_Call

Handle is a helper method to define mock.On call

  • event *domain.Event

func (*MockEventHandler_Expecter) SetNext

func (_e *MockEventHandler_Expecter) SetNext(next interface{}) *MockEventHandler_SetNext_Call

SetNext is a helper method to define mock.On call

  • next domain.EventHandler

type MockEventHandler_GetNext_Call

type MockEventHandler_GetNext_Call struct {
	*mock.Call
}

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

func (*MockEventHandler_GetNext_Call) Return

func (*MockEventHandler_GetNext_Call) Run

func (*MockEventHandler_GetNext_Call) RunAndReturn

type MockEventHandler_Handle_Call

type MockEventHandler_Handle_Call struct {
	*mock.Call
}

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

func (*MockEventHandler_Handle_Call) Return

func (*MockEventHandler_Handle_Call) Run

func (*MockEventHandler_Handle_Call) RunAndReturn

type MockEventHandler_SetNext_Call

type MockEventHandler_SetNext_Call struct {
	*mock.Call
}

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

func (*MockEventHandler_SetNext_Call) Return

func (*MockEventHandler_SetNext_Call) Run

func (*MockEventHandler_SetNext_Call) RunAndReturn

type MockEventSource

type MockEventSource struct {
	mock.Mock
}

MockEventSource is an autogenerated mock type for the EventSource type

func NewMockEventSource

func NewMockEventSource(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEventSource

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

func (*MockEventSource) Subscribe

func (_m *MockEventSource) Subscribe(eventType domain.EventType, params *domain.HookParameters, hookDef *domain.HookDefinition) (<-chan *domain.Event, error)

Subscribe provides a mock function with given fields: eventType, params, hookDef

func (*MockEventSource) Unsubscribe

func (_m *MockEventSource) Unsubscribe(eventCh <-chan *domain.Event)

Unsubscribe provides a mock function with given fields: eventCh

type MockEventSource_Expecter

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

func (*MockEventSource_Expecter) Subscribe

func (_e *MockEventSource_Expecter) Subscribe(eventType interface{}, params interface{}, hookDef interface{}) *MockEventSource_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • eventType domain.EventType
  • params *domain.HookParameters
  • hookDef *domain.HookDefinition

func (*MockEventSource_Expecter) Unsubscribe

func (_e *MockEventSource_Expecter) Unsubscribe(eventCh interface{}) *MockEventSource_Unsubscribe_Call

Unsubscribe is a helper method to define mock.On call

  • eventCh <-chan *domain.Event

type MockEventSource_Subscribe_Call

type MockEventSource_Subscribe_Call struct {
	*mock.Call
}

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

func (*MockEventSource_Subscribe_Call) Return

func (*MockEventSource_Subscribe_Call) Run

func (*MockEventSource_Subscribe_Call) RunAndReturn

type MockEventSource_Unsubscribe_Call

type MockEventSource_Unsubscribe_Call struct {
	*mock.Call
}

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

func (*MockEventSource_Unsubscribe_Call) Return

func (*MockEventSource_Unsubscribe_Call) Run

func (*MockEventSource_Unsubscribe_Call) RunAndReturn

type MockHookManager

type MockHookManager struct {
	mock.Mock
}

MockHookManager is an autogenerated mock type for the HookManager type

func NewMockHookManager

func NewMockHookManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHookManager

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

func (*MockHookManager) RegisterHook

func (_m *MockHookManager) RegisterHook(hook *domain.Hook, hookDef *domain.HookDefinition) error

RegisterHook provides a mock function with given fields: hook, hookDef

func (*MockHookManager) UnregisterAll

func (_m *MockHookManager) UnregisterAll()

UnregisterAll provides a mock function with given fields:

type MockHookManager_Expecter

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

func (*MockHookManager_Expecter) RegisterHook

func (_e *MockHookManager_Expecter) RegisterHook(hook interface{}, hookDef interface{}) *MockHookManager_RegisterHook_Call

RegisterHook is a helper method to define mock.On call

  • hook *domain.Hook
  • hookDef *domain.HookDefinition

func (*MockHookManager_Expecter) UnregisterAll

UnregisterAll is a helper method to define mock.On call

type MockHookManager_RegisterHook_Call

type MockHookManager_RegisterHook_Call struct {
	*mock.Call
}

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

func (*MockHookManager_RegisterHook_Call) Return

func (*MockHookManager_RegisterHook_Call) Run

func (*MockHookManager_RegisterHook_Call) RunAndReturn

type MockHookManager_UnregisterAll_Call

type MockHookManager_UnregisterAll_Call struct {
	*mock.Call
}

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

func (*MockHookManager_UnregisterAll_Call) Return

func (*MockHookManager_UnregisterAll_Call) Run

func (*MockHookManager_UnregisterAll_Call) RunAndReturn

type MockSyncthingClient

type MockSyncthingClient struct {
	mock.Mock
}

MockSyncthingClient is an autogenerated mock type for the SyncthingClient type

func NewMockSyncthingClient

func NewMockSyncthingClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSyncthingClient

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

func (*MockSyncthingClient) GetDiskEvents

func (_m *MockSyncthingClient) GetDiskEvents(since int, timeout int, limit int) ([]events.Event, error)

GetDiskEvents provides a mock function with given fields: since, timeout, limit

func (*MockSyncthingClient) GetEvents

func (_m *MockSyncthingClient) GetEvents(eventTypes []events.EventType, since int, timeout int, limit int) ([]events.Event, error)

GetEvents provides a mock function with given fields: eventTypes, since, timeout, limit

func (*MockSyncthingClient) GetSystemStatus

func (_m *MockSyncthingClient) GetSystemStatus() (*domain.SystemStatus, error)

GetSystemStatus provides a mock function with given fields:

func (*MockSyncthingClient) SubscribeEvent

func (_m *MockSyncthingClient) SubscribeEvent(eventTypes []events.EventType, since int) <-chan events.Event

SubscribeEvent provides a mock function with given fields: eventTypes, since

func (*MockSyncthingClient) UnsubscribeEvent

func (_m *MockSyncthingClient) UnsubscribeEvent(eventCh <-chan events.Event)

UnsubscribeEvent provides a mock function with given fields: eventCh

type MockSyncthingClient_Expecter

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

func (*MockSyncthingClient_Expecter) GetDiskEvents

func (_e *MockSyncthingClient_Expecter) GetDiskEvents(since interface{}, timeout interface{}, limit interface{}) *MockSyncthingClient_GetDiskEvents_Call

GetDiskEvents is a helper method to define mock.On call

  • since int
  • timeout int
  • limit int

func (*MockSyncthingClient_Expecter) GetEvents

func (_e *MockSyncthingClient_Expecter) GetEvents(eventTypes interface{}, since interface{}, timeout interface{}, limit interface{}) *MockSyncthingClient_GetEvents_Call

GetEvents is a helper method to define mock.On call

  • eventTypes []events.EventType
  • since int
  • timeout int
  • limit int

func (*MockSyncthingClient_Expecter) GetSystemStatus

GetSystemStatus is a helper method to define mock.On call

func (*MockSyncthingClient_Expecter) SubscribeEvent

func (_e *MockSyncthingClient_Expecter) SubscribeEvent(eventTypes interface{}, since interface{}) *MockSyncthingClient_SubscribeEvent_Call

SubscribeEvent is a helper method to define mock.On call

  • eventTypes []events.EventType
  • since int

func (*MockSyncthingClient_Expecter) UnsubscribeEvent

func (_e *MockSyncthingClient_Expecter) UnsubscribeEvent(eventCh interface{}) *MockSyncthingClient_UnsubscribeEvent_Call

UnsubscribeEvent is a helper method to define mock.On call

  • eventCh <-chan events.Event

type MockSyncthingClient_GetDiskEvents_Call

type MockSyncthingClient_GetDiskEvents_Call struct {
	*mock.Call
}

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

func (*MockSyncthingClient_GetDiskEvents_Call) Return

func (*MockSyncthingClient_GetDiskEvents_Call) Run

func (*MockSyncthingClient_GetDiskEvents_Call) RunAndReturn

type MockSyncthingClient_GetEvents_Call

type MockSyncthingClient_GetEvents_Call struct {
	*mock.Call
}

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

func (*MockSyncthingClient_GetEvents_Call) Return

func (*MockSyncthingClient_GetEvents_Call) Run

func (_c *MockSyncthingClient_GetEvents_Call) Run(run func(eventTypes []events.EventType, since int, timeout int, limit int)) *MockSyncthingClient_GetEvents_Call

func (*MockSyncthingClient_GetEvents_Call) RunAndReturn

type MockSyncthingClient_GetSystemStatus_Call

type MockSyncthingClient_GetSystemStatus_Call struct {
	*mock.Call
}

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

func (*MockSyncthingClient_GetSystemStatus_Call) Return

func (*MockSyncthingClient_GetSystemStatus_Call) Run

func (*MockSyncthingClient_GetSystemStatus_Call) RunAndReturn

type MockSyncthingClient_SubscribeEvent_Call

type MockSyncthingClient_SubscribeEvent_Call struct {
	*mock.Call
}

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

func (*MockSyncthingClient_SubscribeEvent_Call) Return

func (*MockSyncthingClient_SubscribeEvent_Call) Run

func (*MockSyncthingClient_SubscribeEvent_Call) RunAndReturn

type MockSyncthingClient_UnsubscribeEvent_Call

type MockSyncthingClient_UnsubscribeEvent_Call struct {
	*mock.Call
}

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

func (*MockSyncthingClient_UnsubscribeEvent_Call) Return

func (*MockSyncthingClient_UnsubscribeEvent_Call) Run

func (*MockSyncthingClient_UnsubscribeEvent_Call) RunAndReturn

type MockTimeProvider

type MockTimeProvider struct {
	mock.Mock
}

MockTimeProvider is an autogenerated mock type for the TimeProvider type

func NewMockTimeProvider

func NewMockTimeProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTimeProvider

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

func (*MockTimeProvider) NowUnixMilli

func (_m *MockTimeProvider) NowUnixMilli() int64

NowUnixMilli provides a mock function with given fields:

type MockTimeProvider_Expecter

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

func (*MockTimeProvider_Expecter) NowUnixMilli

NowUnixMilli is a helper method to define mock.On call

type MockTimeProvider_NowUnixMilli_Call

type MockTimeProvider_NowUnixMilli_Call struct {
	*mock.Call
}

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

func (*MockTimeProvider_NowUnixMilli_Call) Return

func (*MockTimeProvider_NowUnixMilli_Call) Run

func (*MockTimeProvider_NowUnixMilli_Call) RunAndReturn

Jump to

Keyboard shortcuts

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