mock_auth_test.go 3.8 KB

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