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