// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMirrorTrigger creates a new instance of MirrorTrigger. 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 NewMirrorTrigger(t interface { mock.TestingT Cleanup(func()) }) *MirrorTrigger { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MirrorTrigger{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MirrorTrigger is an autogenerated mock type for the MirrorTrigger type type MirrorTrigger struct { mock.Mock } type MirrorTrigger_Expecter struct { mock *mock.Mock } func (_m *MirrorTrigger) EXPECT() *MirrorTrigger_Expecter { return &MirrorTrigger_Expecter{mock: &_m.Mock} } // OnPush provides a mock function for the type MirrorTrigger func (_mock *MirrorTrigger) OnPush(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate) { _mock.Called(ctx, repo, updates) return } // MirrorTrigger_OnPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnPush' type MirrorTrigger_OnPush_Call struct { *mock.Call } // OnPush is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - updates []domain.RefUpdate func (_e *MirrorTrigger_Expecter) OnPush(ctx any, repo any, updates any) *MirrorTrigger_OnPush_Call { return &MirrorTrigger_OnPush_Call{Call: _e.mock.On("OnPush", ctx, repo, updates)} } func (_c *MirrorTrigger_OnPush_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate)) *MirrorTrigger_OnPush_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } var arg2 []domain.RefUpdate if args[2] != nil { arg2 = args[2].([]domain.RefUpdate) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MirrorTrigger_OnPush_Call) Return() *MirrorTrigger_OnPush_Call { _c.Call.Return() return _c } func (_c *MirrorTrigger_OnPush_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate)) *MirrorTrigger_OnPush_Call { _c.Run(run) return _c }