// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package toc import ( "github.com/mk6i/open-oscar-server/state" mock "github.com/stretchr/testify/mock" ) // newMockSessionRetriever creates a new instance of mockSessionRetriever. 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 newMockSessionRetriever(t interface { mock.TestingT Cleanup(func()) }) *mockSessionRetriever { mock := &mockSessionRetriever{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // mockSessionRetriever is an autogenerated mock type for the SessionRetriever type type mockSessionRetriever struct { mock.Mock } type mockSessionRetriever_Expecter struct { mock *mock.Mock } func (_m *mockSessionRetriever) EXPECT() *mockSessionRetriever_Expecter { return &mockSessionRetriever_Expecter{mock: &_m.Mock} } // RetrieveSession provides a mock function for the type mockSessionRetriever func (_mock *mockSessionRetriever) RetrieveSession(screenName state.IdentScreenName) *state.Session { ret := _mock.Called(screenName) if len(ret) == 0 { panic("no return value specified for RetrieveSession") } var r0 *state.Session if returnFunc, ok := ret.Get(0).(func(state.IdentScreenName) *state.Session); ok { r0 = returnFunc(screenName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*state.Session) } } return r0 } // mockSessionRetriever_RetrieveSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveSession' type mockSessionRetriever_RetrieveSession_Call struct { *mock.Call } // RetrieveSession is a helper method to define mock.On call // - screenName state.IdentScreenName func (_e *mockSessionRetriever_Expecter) RetrieveSession(screenName interface{}) *mockSessionRetriever_RetrieveSession_Call { return &mockSessionRetriever_RetrieveSession_Call{Call: _e.mock.On("RetrieveSession", screenName)} } func (_c *mockSessionRetriever_RetrieveSession_Call) Run(run func(screenName state.IdentScreenName)) *mockSessionRetriever_RetrieveSession_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 state.IdentScreenName if args[0] != nil { arg0 = args[0].(state.IdentScreenName) } run( arg0, ) }) return _c } func (_c *mockSessionRetriever_RetrieveSession_Call) Return(session *state.Session) *mockSessionRetriever_RetrieveSession_Call { _c.Call.Return(session) return _c } func (_c *mockSessionRetriever_RetrieveSession_Call) RunAndReturn(run func(screenName state.IdentScreenName) *state.Session) *mockSessionRetriever_RetrieveSession_Call { _c.Call.Return(run) return _c }