| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- // Code generated by mockery v2.38.0. DO NOT EDIT.
- package handler
- import (
- state "github.com/mk6i/retro-aim-server/state"
- mock "github.com/stretchr/testify/mock"
- )
- // mockSessionManager is an autogenerated mock type for the SessionManager type
- type mockSessionManager struct {
- mock.Mock
- }
- type mockSessionManager_Expecter struct {
- mock *mock.Mock
- }
- func (_m *mockSessionManager) EXPECT() *mockSessionManager_Expecter {
- return &mockSessionManager_Expecter{mock: &_m.Mock}
- }
- // AddSession provides a mock function with given fields: sessID, screenName
- func (_m *mockSessionManager) AddSession(sessID string, screenName string) *state.Session {
- ret := _m.Called(sessID, screenName)
- if len(ret) == 0 {
- panic("no return value specified for AddSession")
- }
- var r0 *state.Session
- if rf, ok := ret.Get(0).(func(string, string) *state.Session); ok {
- r0 = rf(sessID, screenName)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*state.Session)
- }
- }
- return r0
- }
- // mockSessionManager_AddSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSession'
- type mockSessionManager_AddSession_Call struct {
- *mock.Call
- }
- // AddSession is a helper method to define mock.On call
- // - sessID string
- // - screenName string
- func (_e *mockSessionManager_Expecter) AddSession(sessID interface{}, screenName interface{}) *mockSessionManager_AddSession_Call {
- return &mockSessionManager_AddSession_Call{Call: _e.mock.On("AddSession", sessID, screenName)}
- }
- func (_c *mockSessionManager_AddSession_Call) Run(run func(sessID string, screenName string)) *mockSessionManager_AddSession_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string), args[1].(string))
- })
- return _c
- }
- func (_c *mockSessionManager_AddSession_Call) Return(_a0 *state.Session) *mockSessionManager_AddSession_Call {
- _c.Call.Return(_a0)
- return _c
- }
- func (_c *mockSessionManager_AddSession_Call) RunAndReturn(run func(string, string) *state.Session) *mockSessionManager_AddSession_Call {
- _c.Call.Return(run)
- return _c
- }
- // Empty provides a mock function with given fields:
- func (_m *mockSessionManager) Empty() bool {
- ret := _m.Called()
- if len(ret) == 0 {
- panic("no return value specified for Empty")
- }
- var r0 bool
- if rf, ok := ret.Get(0).(func() bool); ok {
- r0 = rf()
- } else {
- r0 = ret.Get(0).(bool)
- }
- return r0
- }
- // mockSessionManager_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty'
- type mockSessionManager_Empty_Call struct {
- *mock.Call
- }
- // Empty is a helper method to define mock.On call
- func (_e *mockSessionManager_Expecter) Empty() *mockSessionManager_Empty_Call {
- return &mockSessionManager_Empty_Call{Call: _e.mock.On("Empty")}
- }
- func (_c *mockSessionManager_Empty_Call) Run(run func()) *mockSessionManager_Empty_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
- }
- func (_c *mockSessionManager_Empty_Call) Return(_a0 bool) *mockSessionManager_Empty_Call {
- _c.Call.Return(_a0)
- return _c
- }
- func (_c *mockSessionManager_Empty_Call) RunAndReturn(run func() bool) *mockSessionManager_Empty_Call {
- _c.Call.Return(run)
- return _c
- }
- // RemoveSession provides a mock function with given fields: sess
- func (_m *mockSessionManager) RemoveSession(sess *state.Session) {
- _m.Called(sess)
- }
- // mockSessionManager_RemoveSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSession'
- type mockSessionManager_RemoveSession_Call struct {
- *mock.Call
- }
- // RemoveSession is a helper method to define mock.On call
- // - sess *state.Session
- func (_e *mockSessionManager_Expecter) RemoveSession(sess interface{}) *mockSessionManager_RemoveSession_Call {
- return &mockSessionManager_RemoveSession_Call{Call: _e.mock.On("RemoveSession", sess)}
- }
- func (_c *mockSessionManager_RemoveSession_Call) Run(run func(sess *state.Session)) *mockSessionManager_RemoveSession_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(*state.Session))
- })
- return _c
- }
- func (_c *mockSessionManager_RemoveSession_Call) Return() *mockSessionManager_RemoveSession_Call {
- _c.Call.Return()
- return _c
- }
- func (_c *mockSessionManager_RemoveSession_Call) RunAndReturn(run func(*state.Session)) *mockSessionManager_RemoveSession_Call {
- _c.Call.Return(run)
- return _c
- }
- // RetrieveSession provides a mock function with given fields: ID
- func (_m *mockSessionManager) RetrieveSession(ID string) *state.Session {
- ret := _m.Called(ID)
- if len(ret) == 0 {
- panic("no return value specified for RetrieveSession")
- }
- var r0 *state.Session
- if rf, ok := ret.Get(0).(func(string) *state.Session); ok {
- r0 = rf(ID)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*state.Session)
- }
- }
- return r0
- }
- // mockSessionManager_RetrieveSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveSession'
- type mockSessionManager_RetrieveSession_Call struct {
- *mock.Call
- }
- // RetrieveSession is a helper method to define mock.On call
- // - ID string
- func (_e *mockSessionManager_Expecter) RetrieveSession(ID interface{}) *mockSessionManager_RetrieveSession_Call {
- return &mockSessionManager_RetrieveSession_Call{Call: _e.mock.On("RetrieveSession", ID)}
- }
- func (_c *mockSessionManager_RetrieveSession_Call) Run(run func(ID string)) *mockSessionManager_RetrieveSession_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
- })
- return _c
- }
- func (_c *mockSessionManager_RetrieveSession_Call) Return(_a0 *state.Session) *mockSessionManager_RetrieveSession_Call {
- _c.Call.Return(_a0)
- return _c
- }
- func (_c *mockSessionManager_RetrieveSession_Call) RunAndReturn(run func(string) *state.Session) *mockSessionManager_RetrieveSession_Call {
- _c.Call.Return(run)
- return _c
- }
- // newMockSessionManager creates a new instance of mockSessionManager. 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 newMockSessionManager(t interface {
- mock.TestingT
- Cleanup(func())
- }) *mockSessionManager {
- mock := &mockSessionManager{}
- mock.Mock.Test(t)
- t.Cleanup(func() { mock.AssertExpectations(t) })
- return mock
- }
|