mock_session_retriever_test.go 2.2 KB

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