mock_account_manager_test.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package icq_legacy
  5. import (
  6. "context"
  7. "github.com/mk6i/open-oscar-server/state"
  8. mock "github.com/stretchr/testify/mock"
  9. )
  10. // newMockAccountManager creates a new instance of mockAccountManager. 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 newMockAccountManager(t interface {
  13. mock.TestingT
  14. Cleanup(func())
  15. }) *mockAccountManager {
  16. mock := &mockAccountManager{}
  17. mock.Mock.Test(t)
  18. t.Cleanup(func() { mock.AssertExpectations(t) })
  19. return mock
  20. }
  21. // mockAccountManager is an autogenerated mock type for the AccountManager type
  22. type mockAccountManager struct {
  23. mock.Mock
  24. }
  25. type mockAccountManager_Expecter struct {
  26. mock *mock.Mock
  27. }
  28. func (_m *mockAccountManager) EXPECT() *mockAccountManager_Expecter {
  29. return &mockAccountManager_Expecter{mock: &_m.Mock}
  30. }
  31. // SetUserPassword provides a mock function for the type mockAccountManager
  32. func (_mock *mockAccountManager) SetUserPassword(ctx context.Context, screenName state.IdentScreenName, newPassword string) error {
  33. ret := _mock.Called(ctx, screenName, newPassword)
  34. if len(ret) == 0 {
  35. panic("no return value specified for SetUserPassword")
  36. }
  37. var r0 error
  38. if returnFunc, ok := ret.Get(0).(func(context.Context, state.IdentScreenName, string) error); ok {
  39. r0 = returnFunc(ctx, screenName, newPassword)
  40. } else {
  41. r0 = ret.Error(0)
  42. }
  43. return r0
  44. }
  45. // mockAccountManager_SetUserPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUserPassword'
  46. type mockAccountManager_SetUserPassword_Call struct {
  47. *mock.Call
  48. }
  49. // SetUserPassword is a helper method to define mock.On call
  50. // - ctx context.Context
  51. // - screenName state.IdentScreenName
  52. // - newPassword string
  53. func (_e *mockAccountManager_Expecter) SetUserPassword(ctx interface{}, screenName interface{}, newPassword interface{}) *mockAccountManager_SetUserPassword_Call {
  54. return &mockAccountManager_SetUserPassword_Call{Call: _e.mock.On("SetUserPassword", ctx, screenName, newPassword)}
  55. }
  56. func (_c *mockAccountManager_SetUserPassword_Call) Run(run func(ctx context.Context, screenName state.IdentScreenName, newPassword string)) *mockAccountManager_SetUserPassword_Call {
  57. _c.Call.Run(func(args mock.Arguments) {
  58. var arg0 context.Context
  59. if args[0] != nil {
  60. arg0 = args[0].(context.Context)
  61. }
  62. var arg1 state.IdentScreenName
  63. if args[1] != nil {
  64. arg1 = args[1].(state.IdentScreenName)
  65. }
  66. var arg2 string
  67. if args[2] != nil {
  68. arg2 = args[2].(string)
  69. }
  70. run(
  71. arg0,
  72. arg1,
  73. arg2,
  74. )
  75. })
  76. return _c
  77. }
  78. func (_c *mockAccountManager_SetUserPassword_Call) Return(err error) *mockAccountManager_SetUserPassword_Call {
  79. _c.Call.Return(err)
  80. return _c
  81. }
  82. func (_c *mockAccountManager_SetUserPassword_Call) RunAndReturn(run func(ctx context.Context, screenName state.IdentScreenName, newPassword string) error) *mockAccountManager_SetUserPassword_Call {
  83. _c.Call.Return(run)
  84. return _c
  85. }