// 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" ) // NewCIChecksReader creates a new instance of CIChecksReader. 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 NewCIChecksReader(t interface { mock.TestingT Cleanup(func()) }) *CIChecksReader { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CIChecksReader{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CIChecksReader is an autogenerated mock type for the CIChecksReader type type CIChecksReader struct { mock.Mock } type CIChecksReader_Expecter struct { mock *mock.Mock } func (_m *CIChecksReader) EXPECT() *CIChecksReader_Expecter { return &CIChecksReader_Expecter{mock: &_m.Mock} } // CommitChecks provides a mock function for the type CIChecksReader func (_mock *CIChecksReader) CommitChecks(ctx context.Context, repo domain.RepoName, sha string) ([]domain.CICheck, error) { ret := _mock.Called(ctx, repo, sha) if len(ret) == 0 { panic("no return value specified for CommitChecks") } var r0 []domain.CICheck var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) ([]domain.CICheck, error)); ok { return returnFunc(ctx, repo, sha) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) []domain.CICheck); ok { r0 = returnFunc(ctx, repo, sha) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.CICheck) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string) error); ok { r1 = returnFunc(ctx, repo, sha) } else { r1 = ret.Error(1) } return r0, r1 } // CIChecksReader_CommitChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitChecks' type CIChecksReader_CommitChecks_Call struct { *mock.Call } // CommitChecks is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - sha string func (_e *CIChecksReader_Expecter) CommitChecks(ctx any, repo any, sha any) *CIChecksReader_CommitChecks_Call { return &CIChecksReader_CommitChecks_Call{Call: _e.mock.On("CommitChecks", ctx, repo, sha)} } func (_c *CIChecksReader_CommitChecks_Call) Run(run func(ctx context.Context, repo domain.RepoName, sha string)) *CIChecksReader_CommitChecks_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 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CIChecksReader_CommitChecks_Call) Return(cIChecks []domain.CICheck, err error) *CIChecksReader_CommitChecks_Call { _c.Call.Return(cIChecks, err) return _c } func (_c *CIChecksReader_CommitChecks_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, sha string) ([]domain.CICheck, error)) *CIChecksReader_CommitChecks_Call { _c.Call.Return(run) return _c }