// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/application/dto" mock "github.com/stretchr/testify/mock" ) // NewMockHistoryChangeSink creates a new instance of MockHistoryChangeSink. 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 NewMockHistoryChangeSink(t interface { mock.TestingT Cleanup(func()) }) *MockHistoryChangeSink { mock := &MockHistoryChangeSink{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockHistoryChangeSink is an autogenerated mock type for the HistoryChangeSink type type MockHistoryChangeSink struct { mock.Mock } type MockHistoryChangeSink_Expecter struct { mock *mock.Mock } func (_m *MockHistoryChangeSink) EXPECT() *MockHistoryChangeSink_Expecter { return &MockHistoryChangeSink_Expecter{mock: &_m.Mock} } // OnHistoryChanged provides a mock function for the type MockHistoryChangeSink func (_mock *MockHistoryChangeSink) OnHistoryChanged(ctx context.Context, change dto.HistoryChange) { _mock.Called(ctx, change) return } // MockHistoryChangeSink_OnHistoryChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnHistoryChanged' type MockHistoryChangeSink_OnHistoryChanged_Call struct { *mock.Call } // OnHistoryChanged is a helper method to define mock.On call // - ctx context.Context // - change dto.HistoryChange func (_e *MockHistoryChangeSink_Expecter) OnHistoryChanged(ctx any, change any) *MockHistoryChangeSink_OnHistoryChanged_Call { return &MockHistoryChangeSink_OnHistoryChanged_Call{Call: _e.mock.On("OnHistoryChanged", ctx, change)} } func (_c *MockHistoryChangeSink_OnHistoryChanged_Call) Run(run func(ctx context.Context, change dto.HistoryChange)) *MockHistoryChangeSink_OnHistoryChanged_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.HistoryChange if args[1] != nil { arg1 = args[1].(dto.HistoryChange) } run( arg0, arg1, ) }) return _c } func (_c *MockHistoryChangeSink_OnHistoryChanged_Call) Return() *MockHistoryChangeSink_OnHistoryChanged_Call { _c.Call.Return() return _c } func (_c *MockHistoryChangeSink_OnHistoryChanged_Call) RunAndReturn(run func(ctx context.Context, change dto.HistoryChange)) *MockHistoryChangeSink_OnHistoryChanged_Call { _c.Run(run) return _c } // NewMockHistoryMutationCoordinator creates a new instance of MockHistoryMutationCoordinator. 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 NewMockHistoryMutationCoordinator(t interface { mock.TestingT Cleanup(func()) }) *MockHistoryMutationCoordinator { mock := &MockHistoryMutationCoordinator{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockHistoryMutationCoordinator is an autogenerated mock type for the HistoryMutationCoordinator type type MockHistoryMutationCoordinator struct { mock.Mock } type MockHistoryMutationCoordinator_Expecter struct { mock *mock.Mock } func (_m *MockHistoryMutationCoordinator) EXPECT() *MockHistoryMutationCoordinator_Expecter { return &MockHistoryMutationCoordinator_Expecter{mock: &_m.Mock} } // BeginHistoryMutation provides a mock function for the type MockHistoryMutationCoordinator func (_mock *MockHistoryMutationCoordinator) BeginHistoryMutation(ctx context.Context) (func(), error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for BeginHistoryMutation") } var r0 func() var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (func(), error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) func()); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(func()) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockHistoryMutationCoordinator_BeginHistoryMutation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginHistoryMutation' type MockHistoryMutationCoordinator_BeginHistoryMutation_Call struct { *mock.Call } // BeginHistoryMutation is a helper method to define mock.On call // - ctx context.Context func (_e *MockHistoryMutationCoordinator_Expecter) BeginHistoryMutation(ctx any) *MockHistoryMutationCoordinator_BeginHistoryMutation_Call { return &MockHistoryMutationCoordinator_BeginHistoryMutation_Call{Call: _e.mock.On("BeginHistoryMutation", ctx)} } func (_c *MockHistoryMutationCoordinator_BeginHistoryMutation_Call) Run(run func(ctx context.Context)) *MockHistoryMutationCoordinator_BeginHistoryMutation_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockHistoryMutationCoordinator_BeginHistoryMutation_Call) Return(release func(), err error) *MockHistoryMutationCoordinator_BeginHistoryMutation_Call { _c.Call.Return(release, err) return _c } func (_c *MockHistoryMutationCoordinator_BeginHistoryMutation_Call) RunAndReturn(run func(ctx context.Context) (func(), error)) *MockHistoryMutationCoordinator_BeginHistoryMutation_Call { _c.Call.Return(run) return _c }