mock_admin_service_test.go 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Code generated by mockery v2.53.3. DO NOT EDIT.
  2. package toc
  3. import (
  4. context "context"
  5. state "github.com/mk6i/retro-aim-server/state"
  6. mock "github.com/stretchr/testify/mock"
  7. wire "github.com/mk6i/retro-aim-server/wire"
  8. )
  9. // mockAdminService is an autogenerated mock type for the AdminService type
  10. type mockAdminService struct {
  11. mock.Mock
  12. }
  13. type mockAdminService_Expecter struct {
  14. mock *mock.Mock
  15. }
  16. func (_m *mockAdminService) EXPECT() *mockAdminService_Expecter {
  17. return &mockAdminService_Expecter{mock: &_m.Mock}
  18. }
  19. // InfoChangeRequest provides a mock function with given fields: ctx, sess, frame, body
  20. func (_m *mockAdminService) InfoChangeRequest(ctx context.Context, sess *state.Session, frame wire.SNACFrame, body wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error) {
  21. ret := _m.Called(ctx, sess, frame, body)
  22. if len(ret) == 0 {
  23. panic("no return value specified for InfoChangeRequest")
  24. }
  25. var r0 wire.SNACMessage
  26. var r1 error
  27. if rf, ok := ret.Get(0).(func(context.Context, *state.Session, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)); ok {
  28. return rf(ctx, sess, frame, body)
  29. }
  30. if rf, ok := ret.Get(0).(func(context.Context, *state.Session, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) wire.SNACMessage); ok {
  31. r0 = rf(ctx, sess, frame, body)
  32. } else {
  33. r0 = ret.Get(0).(wire.SNACMessage)
  34. }
  35. if rf, ok := ret.Get(1).(func(context.Context, *state.Session, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) error); ok {
  36. r1 = rf(ctx, sess, frame, body)
  37. } else {
  38. r1 = ret.Error(1)
  39. }
  40. return r0, r1
  41. }
  42. // mockAdminService_InfoChangeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InfoChangeRequest'
  43. type mockAdminService_InfoChangeRequest_Call struct {
  44. *mock.Call
  45. }
  46. // InfoChangeRequest is a helper method to define mock.On call
  47. // - ctx context.Context
  48. // - sess *state.Session
  49. // - frame wire.SNACFrame
  50. // - body wire.SNAC_0x07_0x04_AdminInfoChangeRequest
  51. func (_e *mockAdminService_Expecter) InfoChangeRequest(ctx interface{}, sess interface{}, frame interface{}, body interface{}) *mockAdminService_InfoChangeRequest_Call {
  52. return &mockAdminService_InfoChangeRequest_Call{Call: _e.mock.On("InfoChangeRequest", ctx, sess, frame, body)}
  53. }
  54. func (_c *mockAdminService_InfoChangeRequest_Call) Run(run func(ctx context.Context, sess *state.Session, frame wire.SNACFrame, body wire.SNAC_0x07_0x04_AdminInfoChangeRequest)) *mockAdminService_InfoChangeRequest_Call {
  55. _c.Call.Run(func(args mock.Arguments) {
  56. run(args[0].(context.Context), args[1].(*state.Session), args[2].(wire.SNACFrame), args[3].(wire.SNAC_0x07_0x04_AdminInfoChangeRequest))
  57. })
  58. return _c
  59. }
  60. func (_c *mockAdminService_InfoChangeRequest_Call) Return(_a0 wire.SNACMessage, _a1 error) *mockAdminService_InfoChangeRequest_Call {
  61. _c.Call.Return(_a0, _a1)
  62. return _c
  63. }
  64. func (_c *mockAdminService_InfoChangeRequest_Call) RunAndReturn(run func(context.Context, *state.Session, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)) *mockAdminService_InfoChangeRequest_Call {
  65. _c.Call.Return(run)
  66. return _c
  67. }
  68. // newMockAdminService creates a new instance of mockAdminService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  69. // The first argument is typically a *testing.T value.
  70. func newMockAdminService(t interface {
  71. mock.TestingT
  72. Cleanup(func())
  73. }) *mockAdminService {
  74. mock := &mockAdminService{}
  75. mock.Mock.Test(t)
  76. t.Cleanup(func() { mock.AssertExpectations(t) })
  77. return mock
  78. }