// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMockAppStateReader creates a new instance of MockAppStateReader. 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 NewMockAppStateReader(t interface { mock.TestingT Cleanup(func()) }) *MockAppStateReader { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockAppStateReader{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockAppStateReader is an autogenerated mock type for the AppStateReader type type MockAppStateReader struct { mock.Mock } type MockAppStateReader_Expecter struct { mock *mock.Mock } func (_m *MockAppStateReader) EXPECT() *MockAppStateReader_Expecter { return &MockAppStateReader_Expecter{mock: &_m.Mock} } // ListApps provides a mock function for the type MockAppStateReader func (_mock *MockAppStateReader) ListApps(ctx context.Context) ([]string, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListApps") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppStateReader_ListApps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListApps' type MockAppStateReader_ListApps_Call struct { *mock.Call } // ListApps is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppStateReader_Expecter) ListApps(ctx any) *MockAppStateReader_ListApps_Call { return &MockAppStateReader_ListApps_Call{Call: _e.mock.On("ListApps", ctx)} } func (_c *MockAppStateReader_ListApps_Call) Run(run func(ctx context.Context)) *MockAppStateReader_ListApps_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockAppStateReader_ListApps_Call) Return(strings []string, err error) *MockAppStateReader_ListApps_Call { _c.Call.Return(strings, err) return _c } func (_c *MockAppStateReader_ListApps_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockAppStateReader_ListApps_Call { _c.Call.Return(run) return _c } // LoadActive provides a mock function for the type MockAppStateReader func (_mock *MockAppStateReader) LoadActive(ctx context.Context, app string) (domain.AppActive, bool, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadActive") } var r0 domain.AppActive var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppActive, bool, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppActive); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppActive) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, app) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppStateReader_LoadActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadActive' type MockAppStateReader_LoadActive_Call struct { *mock.Call } // LoadActive is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppStateReader_Expecter) LoadActive(ctx any, app any) *MockAppStateReader_LoadActive_Call { return &MockAppStateReader_LoadActive_Call{Call: _e.mock.On("LoadActive", ctx, app)} } func (_c *MockAppStateReader_LoadActive_Call) Run(run func(ctx context.Context, app string)) *MockAppStateReader_LoadActive_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 *MockAppStateReader_LoadActive_Call) Return(appActive domain.AppActive, b bool, err error) *MockAppStateReader_LoadActive_Call { _c.Call.Return(appActive, b, err) return _c } func (_c *MockAppStateReader_LoadActive_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppActive, bool, error)) *MockAppStateReader_LoadActive_Call { _c.Call.Return(run) return _c } // LoadIntent provides a mock function for the type MockAppStateReader func (_mock *MockAppStateReader) LoadIntent(ctx context.Context, app string) (domain.AppStopIntent, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadIntent") } var r0 domain.AppStopIntent var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppStopIntent, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppStopIntent); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppStopIntent) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppStateReader_LoadIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadIntent' type MockAppStateReader_LoadIntent_Call struct { *mock.Call } // LoadIntent is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppStateReader_Expecter) LoadIntent(ctx any, app any) *MockAppStateReader_LoadIntent_Call { return &MockAppStateReader_LoadIntent_Call{Call: _e.mock.On("LoadIntent", ctx, app)} } func (_c *MockAppStateReader_LoadIntent_Call) Run(run func(ctx context.Context, app string)) *MockAppStateReader_LoadIntent_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 *MockAppStateReader_LoadIntent_Call) Return(appStopIntent domain.AppStopIntent, err error) *MockAppStateReader_LoadIntent_Call { _c.Call.Return(appStopIntent, err) return _c } func (_c *MockAppStateReader_LoadIntent_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppStopIntent, error)) *MockAppStateReader_LoadIntent_Call { _c.Call.Return(run) return _c }