mock_chat_session_retriever_test.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // Code generated by mockery v2.53.3. 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. // mockChatSessionRetriever is an autogenerated mock type for the ChatSessionRetriever type
  8. type mockChatSessionRetriever struct {
  9. mock.Mock
  10. }
  11. type mockChatSessionRetriever_Expecter struct {
  12. mock *mock.Mock
  13. }
  14. func (_m *mockChatSessionRetriever) EXPECT() *mockChatSessionRetriever_Expecter {
  15. return &mockChatSessionRetriever_Expecter{mock: &_m.Mock}
  16. }
  17. // AllSessions provides a mock function with given fields: cookie
  18. func (_m *mockChatSessionRetriever) AllSessions(cookie string) []*state.Session {
  19. ret := _m.Called(cookie)
  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(string) []*state.Session); ok {
  25. r0 = rf(cookie)
  26. } else {
  27. if ret.Get(0) != nil {
  28. r0 = ret.Get(0).([]*state.Session)
  29. }
  30. }
  31. return r0
  32. }
  33. // mockChatSessionRetriever_AllSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllSessions'
  34. type mockChatSessionRetriever_AllSessions_Call struct {
  35. *mock.Call
  36. }
  37. // AllSessions is a helper method to define mock.On call
  38. // - cookie string
  39. func (_e *mockChatSessionRetriever_Expecter) AllSessions(cookie interface{}) *mockChatSessionRetriever_AllSessions_Call {
  40. return &mockChatSessionRetriever_AllSessions_Call{Call: _e.mock.On("AllSessions", cookie)}
  41. }
  42. func (_c *mockChatSessionRetriever_AllSessions_Call) Run(run func(cookie string)) *mockChatSessionRetriever_AllSessions_Call {
  43. _c.Call.Run(func(args mock.Arguments) {
  44. run(args[0].(string))
  45. })
  46. return _c
  47. }
  48. func (_c *mockChatSessionRetriever_AllSessions_Call) Return(_a0 []*state.Session) *mockChatSessionRetriever_AllSessions_Call {
  49. _c.Call.Return(_a0)
  50. return _c
  51. }
  52. func (_c *mockChatSessionRetriever_AllSessions_Call) RunAndReturn(run func(string) []*state.Session) *mockChatSessionRetriever_AllSessions_Call {
  53. _c.Call.Return(run)
  54. return _c
  55. }
  56. // newMockChatSessionRetriever creates a new instance of mockChatSessionRetriever. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  57. // The first argument is typically a *testing.T value.
  58. func newMockChatSessionRetriever(t interface {
  59. mock.TestingT
  60. Cleanup(func())
  61. }) *mockChatSessionRetriever {
  62. mock := &mockChatSessionRetriever{}
  63. mock.Mock.Test(t)
  64. t.Cleanup(func() { mock.AssertExpectations(t) })
  65. return mock
  66. }