mock_auth_test.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. mock := &mockAuthService{}
  18. mock.Mock.Test(t)
  19. t.Cleanup(func() { mock.AssertExpectations(t) })
  20. return mock
  21. }
  22. // mockAuthService is an autogenerated mock type for the AuthService type
  23. type mockAuthService struct {
  24. mock.Mock
  25. }
  26. type mockAuthService_Expecter struct {
  27. mock *mock.Mock
  28. }
  29. func (_m *mockAuthService) EXPECT() *mockAuthService_Expecter {
  30. return &mockAuthService_Expecter{mock: &_m.Mock}
  31. }
  32. // KerberosLogin provides a mock function for the type mockAuthService
  33. func (_mock *mockAuthService) KerberosLogin(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, endpointCfg config.Endpoint) (wire.SNACMessage, error) {
  34. ret := _mock.Called(ctx, inBody, endpointCfg)
  35. if len(ret) == 0 {
  36. panic("no return value specified for KerberosLogin")
  37. }
  38. var r0 wire.SNACMessage
  39. var r1 error
  40. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, config.Endpoint) (wire.SNACMessage, error)); ok {
  41. return returnFunc(ctx, inBody, endpointCfg)
  42. }
  43. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, config.Endpoint) wire.SNACMessage); ok {
  44. r0 = returnFunc(ctx, inBody, endpointCfg)
  45. } else {
  46. r0 = ret.Get(0).(wire.SNACMessage)
  47. }
  48. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, config.Endpoint) error); ok {
  49. r1 = returnFunc(ctx, inBody, endpointCfg)
  50. } else {
  51. r1 = ret.Error(1)
  52. }
  53. return r0, r1
  54. }
  55. // mockAuthService_KerberosLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KerberosLogin'
  56. type mockAuthService_KerberosLogin_Call struct {
  57. *mock.Call
  58. }
  59. // KerberosLogin is a helper method to define mock.On call
  60. // - ctx context.Context
  61. // - inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest
  62. // - endpointCfg config.Endpoint
  63. func (_e *mockAuthService_Expecter) KerberosLogin(ctx interface{}, inBody interface{}, endpointCfg interface{}) *mockAuthService_KerberosLogin_Call {
  64. return &mockAuthService_KerberosLogin_Call{Call: _e.mock.On("KerberosLogin", ctx, inBody, endpointCfg)}
  65. }
  66. func (_c *mockAuthService_KerberosLogin_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, endpointCfg config.Endpoint)) *mockAuthService_KerberosLogin_Call {
  67. _c.Call.Run(func(args mock.Arguments) {
  68. var arg0 context.Context
  69. if args[0] != nil {
  70. arg0 = args[0].(context.Context)
  71. }
  72. var arg1 wire.SNAC_0x050C_0x0002_KerberosLoginRequest
  73. if args[1] != nil {
  74. arg1 = args[1].(wire.SNAC_0x050C_0x0002_KerberosLoginRequest)
  75. }
  76. var arg2 config.Endpoint
  77. if args[2] != nil {
  78. arg2 = args[2].(config.Endpoint)
  79. }
  80. run(
  81. arg0,
  82. arg1,
  83. arg2,
  84. )
  85. })
  86. return _c
  87. }
  88. func (_c *mockAuthService_KerberosLogin_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_KerberosLogin_Call {
  89. _c.Call.Return(sNACMessage, err)
  90. return _c
  91. }
  92. 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 {
  93. _c.Call.Return(run)
  94. return _c
  95. }