mock_chat_session_retriever_test.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package http
  5. import (
  6. "github.com/mk6i/open-oscar-server/state"
  7. mock "github.com/stretchr/testify/mock"
  8. )
  9. // 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.
  10. // The first argument is typically a *testing.T value.
  11. func newMockChatSessionRetriever(t interface {
  12. mock.TestingT
  13. Cleanup(func())
  14. }) *mockChatSessionRetriever {
  15. if helper, ok := t.(interface{ Helper() }); ok {
  16. helper.Helper()
  17. }
  18. mock := &mockChatSessionRetriever{}
  19. mock.Mock.Test(t)
  20. t.Cleanup(func() {
  21. if helper, ok := t.(interface{ Helper() }); ok {
  22. helper.Helper()
  23. }
  24. mock.AssertExpectations(t)
  25. })
  26. return mock
  27. }
  28. // mockChatSessionRetriever is an autogenerated mock type for the ChatSessionRetriever type
  29. type mockChatSessionRetriever struct {
  30. mock.Mock
  31. }
  32. type mockChatSessionRetriever_Expecter struct {
  33. mock *mock.Mock
  34. }
  35. func (_m *mockChatSessionRetriever) EXPECT() *mockChatSessionRetriever_Expecter {
  36. return &mockChatSessionRetriever_Expecter{mock: &_m.Mock}
  37. }
  38. // AllSessions provides a mock function for the type mockChatSessionRetriever
  39. func (_mock *mockChatSessionRetriever) AllSessions(cookie string) []*state.Session {
  40. ret := _mock.Called(cookie)
  41. if len(ret) == 0 {
  42. panic("no return value specified for AllSessions")
  43. }
  44. var r0 []*state.Session
  45. if returnFunc, ok := ret.Get(0).(func(string) []*state.Session); ok {
  46. r0 = returnFunc(cookie)
  47. } else {
  48. if ret.Get(0) != nil {
  49. r0 = ret.Get(0).([]*state.Session)
  50. }
  51. }
  52. return r0
  53. }
  54. // mockChatSessionRetriever_AllSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllSessions'
  55. type mockChatSessionRetriever_AllSessions_Call struct {
  56. *mock.Call
  57. }
  58. // AllSessions is a helper method to define mock.On call
  59. // - cookie string
  60. func (_e *mockChatSessionRetriever_Expecter) AllSessions(cookie any) *mockChatSessionRetriever_AllSessions_Call {
  61. return &mockChatSessionRetriever_AllSessions_Call{Call: _e.mock.On("AllSessions", cookie)}
  62. }
  63. func (_c *mockChatSessionRetriever_AllSessions_Call) Run(run func(cookie string)) *mockChatSessionRetriever_AllSessions_Call {
  64. _c.Call.Run(func(args mock.Arguments) {
  65. var arg0 string
  66. if args[0] != nil {
  67. arg0 = args[0].(string)
  68. }
  69. run(
  70. arg0,
  71. )
  72. })
  73. return _c
  74. }
  75. func (_c *mockChatSessionRetriever_AllSessions_Call) Return(sessions []*state.Session) *mockChatSessionRetriever_AllSessions_Call {
  76. _c.Call.Return(sessions)
  77. return _c
  78. }
  79. func (_c *mockChatSessionRetriever_AllSessions_Call) RunAndReturn(run func(cookie string) []*state.Session) *mockChatSessionRetriever_AllSessions_Call {
  80. _c.Call.Return(run)
  81. return _c
  82. }