mock_admin_service_test.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package toc
  5. import (
  6. "context"
  7. "github.com/mk6i/open-oscar-server/state"
  8. "github.com/mk6i/open-oscar-server/wire"
  9. mock "github.com/stretchr/testify/mock"
  10. )
  11. // 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.
  12. // The first argument is typically a *testing.T value.
  13. func newMockAdminService(t interface {
  14. mock.TestingT
  15. Cleanup(func())
  16. }) *mockAdminService {
  17. mock := &mockAdminService{}
  18. mock.Mock.Test(t)
  19. t.Cleanup(func() { mock.AssertExpectations(t) })
  20. return mock
  21. }
  22. // mockAdminService is an autogenerated mock type for the AdminService type
  23. type mockAdminService struct {
  24. mock.Mock
  25. }
  26. type mockAdminService_Expecter struct {
  27. mock *mock.Mock
  28. }
  29. func (_m *mockAdminService) EXPECT() *mockAdminService_Expecter {
  30. return &mockAdminService_Expecter{mock: &_m.Mock}
  31. }
  32. // InfoChangeRequest provides a mock function for the type mockAdminService
  33. func (_mock *mockAdminService) InfoChangeRequest(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error) {
  34. ret := _mock.Called(ctx, instance, inFrame, inBody)
  35. if len(ret) == 0 {
  36. panic("no return value specified for InfoChangeRequest")
  37. }
  38. var r0 wire.SNACMessage
  39. var r1 error
  40. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)); ok {
  41. return returnFunc(ctx, instance, inFrame, inBody)
  42. }
  43. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) wire.SNACMessage); ok {
  44. r0 = returnFunc(ctx, instance, inFrame, inBody)
  45. } else {
  46. r0 = ret.Get(0).(wire.SNACMessage)
  47. }
  48. if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) error); ok {
  49. r1 = returnFunc(ctx, instance, inFrame, inBody)
  50. } else {
  51. r1 = ret.Error(1)
  52. }
  53. return r0, r1
  54. }
  55. // mockAdminService_InfoChangeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InfoChangeRequest'
  56. type mockAdminService_InfoChangeRequest_Call struct {
  57. *mock.Call
  58. }
  59. // InfoChangeRequest is a helper method to define mock.On call
  60. // - ctx context.Context
  61. // - instance *state.SessionInstance
  62. // - inFrame wire.SNACFrame
  63. // - inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest
  64. func (_e *mockAdminService_Expecter) InfoChangeRequest(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockAdminService_InfoChangeRequest_Call {
  65. return &mockAdminService_InfoChangeRequest_Call{Call: _e.mock.On("InfoChangeRequest", ctx, instance, inFrame, inBody)}
  66. }
  67. func (_c *mockAdminService_InfoChangeRequest_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest)) *mockAdminService_InfoChangeRequest_Call {
  68. _c.Call.Run(func(args mock.Arguments) {
  69. var arg0 context.Context
  70. if args[0] != nil {
  71. arg0 = args[0].(context.Context)
  72. }
  73. var arg1 *state.SessionInstance
  74. if args[1] != nil {
  75. arg1 = args[1].(*state.SessionInstance)
  76. }
  77. var arg2 wire.SNACFrame
  78. if args[2] != nil {
  79. arg2 = args[2].(wire.SNACFrame)
  80. }
  81. var arg3 wire.SNAC_0x07_0x04_AdminInfoChangeRequest
  82. if args[3] != nil {
  83. arg3 = args[3].(wire.SNAC_0x07_0x04_AdminInfoChangeRequest)
  84. }
  85. run(
  86. arg0,
  87. arg1,
  88. arg2,
  89. arg3,
  90. )
  91. })
  92. return _c
  93. }
  94. func (_c *mockAdminService_InfoChangeRequest_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAdminService_InfoChangeRequest_Call {
  95. _c.Call.Return(sNACMessage, err)
  96. return _c
  97. }
  98. func (_c *mockAdminService_InfoChangeRequest_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)) *mockAdminService_InfoChangeRequest_Call {
  99. _c.Call.Return(run)
  100. return _c
  101. }