mock_auth_test.go 3.6 KB

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