// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package toc import ( "context" "github.com/mk6i/open-oscar-server/state" mock "github.com/stretchr/testify/mock" ) // newMockTOCConfigStore creates a new instance of mockTOCConfigStore. 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 newMockTOCConfigStore(t interface { mock.TestingT Cleanup(func()) }) *mockTOCConfigStore { mock := &mockTOCConfigStore{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // mockTOCConfigStore is an autogenerated mock type for the TOCConfigStore type type mockTOCConfigStore struct { mock.Mock } type mockTOCConfigStore_Expecter struct { mock *mock.Mock } func (_m *mockTOCConfigStore) EXPECT() *mockTOCConfigStore_Expecter { return &mockTOCConfigStore_Expecter{mock: &_m.Mock} } // SetTOCConfig provides a mock function for the type mockTOCConfigStore func (_mock *mockTOCConfigStore) SetTOCConfig(ctx context.Context, user state.IdentScreenName, config string) error { ret := _mock.Called(ctx, user, config) if len(ret) == 0 { panic("no return value specified for SetTOCConfig") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, string) error); ok { r0 = returnFunc(ctx, user, config) } else { r0 = ret.Error(0) } return r0 } // mockTOCConfigStore_SetTOCConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTOCConfig' type mockTOCConfigStore_SetTOCConfig_Call struct { *mock.Call } // SetTOCConfig is a helper method to define mock.On call // - ctx context.Context // - user state.IdentScreenName // - config string func (_e *mockTOCConfigStore_Expecter) SetTOCConfig(ctx interface{}, user interface{}, config interface{}) *mockTOCConfigStore_SetTOCConfig_Call { return &mockTOCConfigStore_SetTOCConfig_Call{Call: _e.mock.On("SetTOCConfig", ctx, user, config)} } func (_c *mockTOCConfigStore_SetTOCConfig_Call) Run(run func(ctx context.Context, user state.IdentScreenName, config string)) *mockTOCConfigStore_SetTOCConfig_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 state.IdentScreenName if args[1] != nil { arg1 = args[1].(state.IdentScreenName) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *mockTOCConfigStore_SetTOCConfig_Call) Return(err error) *mockTOCConfigStore_SetTOCConfig_Call { _c.Call.Return(err) return _c } func (_c *mockTOCConfigStore_SetTOCConfig_Call) RunAndReturn(run func(ctx context.Context, user state.IdentScreenName, config string) error) *mockTOCConfigStore_SetTOCConfig_Call { _c.Call.Return(run) return _c } // User provides a mock function for the type mockTOCConfigStore func (_mock *mockTOCConfigStore) User(ctx context.Context, screenName state.IdentScreenName) (*state.User, error) { ret := _mock.Called(ctx, screenName) if len(ret) == 0 { panic("no return value specified for User") } var r0 *state.User var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName) (*state.User, error)); ok { return returnFunc(ctx, screenName) } if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName) *state.User); ok { r0 = returnFunc(ctx, screenName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*state.User) } } if returnFunc, ok := ret.Get(1).(func(context.Context, state.IdentScreenName) error); ok { r1 = returnFunc(ctx, screenName) } else { r1 = ret.Error(1) } return r0, r1 } // mockTOCConfigStore_User_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'User' type mockTOCConfigStore_User_Call struct { *mock.Call } // User is a helper method to define mock.On call // - ctx context.Context // - screenName state.IdentScreenName func (_e *mockTOCConfigStore_Expecter) User(ctx interface{}, screenName interface{}) *mockTOCConfigStore_User_Call { return &mockTOCConfigStore_User_Call{Call: _e.mock.On("User", ctx, screenName)} } func (_c *mockTOCConfigStore_User_Call) Run(run func(ctx context.Context, screenName state.IdentScreenName)) *mockTOCConfigStore_User_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 state.IdentScreenName if args[1] != nil { arg1 = args[1].(state.IdentScreenName) } run( arg0, arg1, ) }) return _c } func (_c *mockTOCConfigStore_User_Call) Return(user *state.User, err error) *mockTOCConfigStore_User_Call { _c.Call.Return(user, err) return _c } func (_c *mockTOCConfigStore_User_Call) RunAndReturn(run func(ctx context.Context, screenName state.IdentScreenName) (*state.User, error)) *mockTOCConfigStore_User_Call { _c.Call.Return(run) return _c }