// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewGitBackend creates a new instance of GitBackend. 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 NewGitBackend(t interface { mock.TestingT Cleanup(func()) }) *GitBackend { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &GitBackend{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // GitBackend is an autogenerated mock type for the GitBackend type type GitBackend struct { mock.Mock } type GitBackend_Expecter struct { mock *mock.Mock } func (_m *GitBackend) EXPECT() *GitBackend_Expecter { return &GitBackend_Expecter{mock: &_m.Mock} } // HTTPBackend provides a mock function for the type GitBackend func (_mock *GitBackend) HTTPBackend(ctx context.Context, push bool) (ports.HTTPBackend, error) { ret := _mock.Called(ctx, push) if len(ret) == 0 { panic("no return value specified for HTTPBackend") } var r0 ports.HTTPBackend var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, bool) (ports.HTTPBackend, error)); ok { return returnFunc(ctx, push) } if returnFunc, ok := ret.Get(0).(func(context.Context, bool) ports.HTTPBackend); ok { r0 = returnFunc(ctx, push) } else { r0 = ret.Get(0).(ports.HTTPBackend) } if returnFunc, ok := ret.Get(1).(func(context.Context, bool) error); ok { r1 = returnFunc(ctx, push) } else { r1 = ret.Error(1) } return r0, r1 } // GitBackend_HTTPBackend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HTTPBackend' type GitBackend_HTTPBackend_Call struct { *mock.Call } // HTTPBackend is a helper method to define mock.On call // - ctx context.Context // - push bool func (_e *GitBackend_Expecter) HTTPBackend(ctx any, push any) *GitBackend_HTTPBackend_Call { return &GitBackend_HTTPBackend_Call{Call: _e.mock.On("HTTPBackend", ctx, push)} } func (_c *GitBackend_HTTPBackend_Call) Run(run func(ctx context.Context, push bool)) *GitBackend_HTTPBackend_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 bool if args[1] != nil { arg1 = args[1].(bool) } run( arg0, arg1, ) }) return _c } func (_c *GitBackend_HTTPBackend_Call) Return(hTTPBackend ports.HTTPBackend, err error) *GitBackend_HTTPBackend_Call { _c.Call.Return(hTTPBackend, err) return _c } func (_c *GitBackend_HTTPBackend_Call) RunAndReturn(run func(ctx context.Context, push bool) (ports.HTTPBackend, error)) *GitBackend_HTTPBackend_Call { _c.Call.Return(run) return _c }