// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "io" "github.com/bnema/dumber/internal/application/port" mock "github.com/stretchr/testify/mock" ) // NewMockBrowserWindowOpener creates a new instance of MockBrowserWindowOpener. 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 NewMockBrowserWindowOpener(t interface { mock.TestingT Cleanup(func()) }) *MockBrowserWindowOpener { mock := &MockBrowserWindowOpener{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockBrowserWindowOpener is an autogenerated mock type for the BrowserWindowOpener type type MockBrowserWindowOpener struct { mock.Mock } type MockBrowserWindowOpener_Expecter struct { mock *mock.Mock } func (_m *MockBrowserWindowOpener) EXPECT() *MockBrowserWindowOpener_Expecter { return &MockBrowserWindowOpener_Expecter{mock: &_m.Mock} } // OpenExternalURL provides a mock function for the type MockBrowserWindowOpener func (_mock *MockBrowserWindowOpener) OpenExternalURL(ctx context.Context, url string) error { ret := _mock.Called(ctx, url) if len(ret) == 0 { panic("no return value specified for OpenExternalURL") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, url) } else { r0 = ret.Error(0) } return r0 } // MockBrowserWindowOpener_OpenExternalURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenExternalURL' type MockBrowserWindowOpener_OpenExternalURL_Call struct { *mock.Call } // OpenExternalURL is a helper method to define mock.On call // - ctx context.Context // - url string func (_e *MockBrowserWindowOpener_Expecter) OpenExternalURL(ctx any, url any) *MockBrowserWindowOpener_OpenExternalURL_Call { return &MockBrowserWindowOpener_OpenExternalURL_Call{Call: _e.mock.On("OpenExternalURL", ctx, url)} } func (_c *MockBrowserWindowOpener_OpenExternalURL_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenExternalURL_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockBrowserWindowOpener_OpenExternalURL_Call) Return(err error) *MockBrowserWindowOpener_OpenExternalURL_Call { _c.Call.Return(err) return _c } func (_c *MockBrowserWindowOpener_OpenExternalURL_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenExternalURL_Call { _c.Call.Return(run) return _c } // OpenFreshWindow provides a mock function for the type MockBrowserWindowOpener func (_mock *MockBrowserWindowOpener) OpenFreshWindow(ctx context.Context, url string) error { ret := _mock.Called(ctx, url) if len(ret) == 0 { panic("no return value specified for OpenFreshWindow") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, url) } else { r0 = ret.Error(0) } return r0 } // MockBrowserWindowOpener_OpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFreshWindow' type MockBrowserWindowOpener_OpenFreshWindow_Call struct { *mock.Call } // OpenFreshWindow is a helper method to define mock.On call // - ctx context.Context // - url string func (_e *MockBrowserWindowOpener_Expecter) OpenFreshWindow(ctx any, url any) *MockBrowserWindowOpener_OpenFreshWindow_Call { return &MockBrowserWindowOpener_OpenFreshWindow_Call{Call: _e.mock.On("OpenFreshWindow", ctx, url)} } func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenFreshWindow_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Return(err error) *MockBrowserWindowOpener_OpenFreshWindow_Call { _c.Call.Return(err) return _c } func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenFreshWindow_Call { _c.Call.Return(run) return _c } // NewMockBrowserLaunchRelay creates a new instance of MockBrowserLaunchRelay. 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 NewMockBrowserLaunchRelay(t interface { mock.TestingT Cleanup(func()) }) *MockBrowserLaunchRelay { mock := &MockBrowserLaunchRelay{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockBrowserLaunchRelay is an autogenerated mock type for the BrowserLaunchRelay type type MockBrowserLaunchRelay struct { mock.Mock } type MockBrowserLaunchRelay_Expecter struct { mock *mock.Mock } func (_m *MockBrowserLaunchRelay) EXPECT() *MockBrowserLaunchRelay_Expecter { return &MockBrowserLaunchRelay_Expecter{mock: &_m.Mock} } // DeliverOpenExternalURL provides a mock function for the type MockBrowserLaunchRelay func (_mock *MockBrowserLaunchRelay) DeliverOpenExternalURL(ctx context.Context, url string) (bool, error) { ret := _mock.Called(ctx, url) if len(ret) == 0 { panic("no return value specified for DeliverOpenExternalURL") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, url) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, url) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, url) } else { r1 = ret.Error(1) } return r0, r1 } // MockBrowserLaunchRelay_DeliverOpenExternalURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenExternalURL' type MockBrowserLaunchRelay_DeliverOpenExternalURL_Call struct { *mock.Call } // DeliverOpenExternalURL is a helper method to define mock.On call // - ctx context.Context // - url string func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenExternalURL(ctx any, url any) *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call { return &MockBrowserLaunchRelay_DeliverOpenExternalURL_Call{Call: _e.mock.On("DeliverOpenExternalURL", ctx, url)} } func (_c *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call { _c.Call.Return(b, err) return _c } func (_c *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenExternalURL_Call { _c.Call.Return(run) return _c } // DeliverOpenFreshWindow provides a mock function for the type MockBrowserLaunchRelay func (_mock *MockBrowserLaunchRelay) DeliverOpenFreshWindow(ctx context.Context, url string) (bool, error) { ret := _mock.Called(ctx, url) if len(ret) == 0 { panic("no return value specified for DeliverOpenFreshWindow") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, url) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, url) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, url) } else { r1 = ret.Error(1) } return r0, r1 } // MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenFreshWindow' type MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call struct { *mock.Call } // DeliverOpenFreshWindow is a helper method to define mock.On call // - ctx context.Context // - url string func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenFreshWindow(ctx any, url any) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { return &MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call{Call: _e.mock.On("DeliverOpenFreshWindow", ctx, url)} } func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { _c.Call.Return(b, err) return _c } func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { _c.Call.Return(run) return _c } // Listen provides a mock function for the type MockBrowserLaunchRelay func (_mock *MockBrowserLaunchRelay) Listen(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error) { ret := _mock.Called(ctx, opener) if len(ret) == 0 { panic("no return value specified for Listen") } var r0 io.Closer var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) (io.Closer, error)); ok { return returnFunc(ctx, opener) } if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) io.Closer); ok { r0 = returnFunc(ctx, opener) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.Closer) } } if returnFunc, ok := ret.Get(1).(func(context.Context, port.BrowserWindowOpener) error); ok { r1 = returnFunc(ctx, opener) } else { r1 = ret.Error(1) } return r0, r1 } // MockBrowserLaunchRelay_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen' type MockBrowserLaunchRelay_Listen_Call struct { *mock.Call } // Listen is a helper method to define mock.On call // - ctx context.Context // - opener port.BrowserWindowOpener func (_e *MockBrowserLaunchRelay_Expecter) Listen(ctx any, opener any) *MockBrowserLaunchRelay_Listen_Call { return &MockBrowserLaunchRelay_Listen_Call{Call: _e.mock.On("Listen", ctx, opener)} } func (_c *MockBrowserLaunchRelay_Listen_Call) Run(run func(ctx context.Context, opener port.BrowserWindowOpener)) *MockBrowserLaunchRelay_Listen_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 port.BrowserWindowOpener if args[1] != nil { arg1 = args[1].(port.BrowserWindowOpener) } run( arg0, arg1, ) }) return _c } func (_c *MockBrowserLaunchRelay_Listen_Call) Return(closer io.Closer, err error) *MockBrowserLaunchRelay_Listen_Call { _c.Call.Return(closer, err) return _c } func (_c *MockBrowserLaunchRelay_Listen_Call) RunAndReturn(run func(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error)) *MockBrowserLaunchRelay_Listen_Call { _c.Call.Return(run) return _c }