mock_SessionManager.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // Code generated by mockery v2.52.1. DO NOT EDIT.
  2. package oscar
  3. import (
  4. state "github.com/mk6i/retro-aim-server/state"
  5. mock "github.com/stretchr/testify/mock"
  6. )
  7. // mockSessionManager is an autogenerated mock type for the SessionManager type
  8. type mockSessionManager struct {
  9. mock.Mock
  10. }
  11. type mockSessionManager_Expecter struct {
  12. mock *mock.Mock
  13. }
  14. func (_m *mockSessionManager) EXPECT() *mockSessionManager_Expecter {
  15. return &mockSessionManager_Expecter{mock: &_m.Mock}
  16. }
  17. // RetrieveBOSSession provides a mock function with given fields: authCookie
  18. func (_m *mockSessionManager) RetrieveBOSSession(authCookie []byte) (*state.Session, error) {
  19. ret := _m.Called(authCookie)
  20. if len(ret) == 0 {
  21. panic("no return value specified for RetrieveBOSSession")
  22. }
  23. var r0 *state.Session
  24. var r1 error
  25. if rf, ok := ret.Get(0).(func([]byte) (*state.Session, error)); ok {
  26. return rf(authCookie)
  27. }
  28. if rf, ok := ret.Get(0).(func([]byte) *state.Session); ok {
  29. r0 = rf(authCookie)
  30. } else {
  31. if ret.Get(0) != nil {
  32. r0 = ret.Get(0).(*state.Session)
  33. }
  34. }
  35. if rf, ok := ret.Get(1).(func([]byte) error); ok {
  36. r1 = rf(authCookie)
  37. } else {
  38. r1 = ret.Error(1)
  39. }
  40. return r0, r1
  41. }
  42. // mockSessionManager_RetrieveBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveBOSSession'
  43. type mockSessionManager_RetrieveBOSSession_Call struct {
  44. *mock.Call
  45. }
  46. // RetrieveBOSSession is a helper method to define mock.On call
  47. // - authCookie []byte
  48. func (_e *mockSessionManager_Expecter) RetrieveBOSSession(authCookie interface{}) *mockSessionManager_RetrieveBOSSession_Call {
  49. return &mockSessionManager_RetrieveBOSSession_Call{Call: _e.mock.On("RetrieveBOSSession", authCookie)}
  50. }
  51. func (_c *mockSessionManager_RetrieveBOSSession_Call) Run(run func(authCookie []byte)) *mockSessionManager_RetrieveBOSSession_Call {
  52. _c.Call.Run(func(args mock.Arguments) {
  53. run(args[0].([]byte))
  54. })
  55. return _c
  56. }
  57. func (_c *mockSessionManager_RetrieveBOSSession_Call) Return(_a0 *state.Session, _a1 error) *mockSessionManager_RetrieveBOSSession_Call {
  58. _c.Call.Return(_a0, _a1)
  59. return _c
  60. }
  61. func (_c *mockSessionManager_RetrieveBOSSession_Call) RunAndReturn(run func([]byte) (*state.Session, error)) *mockSessionManager_RetrieveBOSSession_Call {
  62. _c.Call.Return(run)
  63. return _c
  64. }
  65. // 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.
  66. // The first argument is typically a *testing.T value.
  67. func newMockSessionManager(t interface {
  68. mock.TestingT
  69. Cleanup(func())
  70. }) *mockSessionManager {
  71. mock := &mockSessionManager{}
  72. mock.Mock.Test(t)
  73. t.Cleanup(func() { mock.AssertExpectations(t) })
  74. return mock
  75. }