mock_chat_room_creator_test.go 2.5 KB

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