MockProfileManager.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // Code generated by mockery v2.35.2. DO NOT EDIT.
  2. package server
  3. import mock "github.com/stretchr/testify/mock"
  4. // MockProfileManager is an autogenerated mock type for the ProfileManager type
  5. type MockProfileManager struct {
  6. mock.Mock
  7. }
  8. type MockProfileManager_Expecter struct {
  9. mock *mock.Mock
  10. }
  11. func (_m *MockProfileManager) EXPECT() *MockProfileManager_Expecter {
  12. return &MockProfileManager_Expecter{mock: &_m.Mock}
  13. }
  14. // RetrieveProfile provides a mock function with given fields: screenName
  15. func (_m *MockProfileManager) RetrieveProfile(screenName string) (string, error) {
  16. ret := _m.Called(screenName)
  17. var r0 string
  18. var r1 error
  19. if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
  20. return rf(screenName)
  21. }
  22. if rf, ok := ret.Get(0).(func(string) string); ok {
  23. r0 = rf(screenName)
  24. } else {
  25. r0 = ret.Get(0).(string)
  26. }
  27. if rf, ok := ret.Get(1).(func(string) error); ok {
  28. r1 = rf(screenName)
  29. } else {
  30. r1 = ret.Error(1)
  31. }
  32. return r0, r1
  33. }
  34. // MockProfileManager_RetrieveProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveProfile'
  35. type MockProfileManager_RetrieveProfile_Call struct {
  36. *mock.Call
  37. }
  38. // RetrieveProfile is a helper method to define mock.On call
  39. // - screenName string
  40. func (_e *MockProfileManager_Expecter) RetrieveProfile(screenName interface{}) *MockProfileManager_RetrieveProfile_Call {
  41. return &MockProfileManager_RetrieveProfile_Call{Call: _e.mock.On("RetrieveProfile", screenName)}
  42. }
  43. func (_c *MockProfileManager_RetrieveProfile_Call) Run(run func(screenName string)) *MockProfileManager_RetrieveProfile_Call {
  44. _c.Call.Run(func(args mock.Arguments) {
  45. run(args[0].(string))
  46. })
  47. return _c
  48. }
  49. func (_c *MockProfileManager_RetrieveProfile_Call) Return(_a0 string, _a1 error) *MockProfileManager_RetrieveProfile_Call {
  50. _c.Call.Return(_a0, _a1)
  51. return _c
  52. }
  53. func (_c *MockProfileManager_RetrieveProfile_Call) RunAndReturn(run func(string) (string, error)) *MockProfileManager_RetrieveProfile_Call {
  54. _c.Call.Return(run)
  55. return _c
  56. }
  57. // UpsertProfile provides a mock function with given fields: screenName, body
  58. func (_m *MockProfileManager) UpsertProfile(screenName string, body string) error {
  59. ret := _m.Called(screenName, body)
  60. var r0 error
  61. if rf, ok := ret.Get(0).(func(string, string) error); ok {
  62. r0 = rf(screenName, body)
  63. } else {
  64. r0 = ret.Error(0)
  65. }
  66. return r0
  67. }
  68. // MockProfileManager_UpsertProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertProfile'
  69. type MockProfileManager_UpsertProfile_Call struct {
  70. *mock.Call
  71. }
  72. // UpsertProfile is a helper method to define mock.On call
  73. // - screenName string
  74. // - body string
  75. func (_e *MockProfileManager_Expecter) UpsertProfile(screenName interface{}, body interface{}) *MockProfileManager_UpsertProfile_Call {
  76. return &MockProfileManager_UpsertProfile_Call{Call: _e.mock.On("UpsertProfile", screenName, body)}
  77. }
  78. func (_c *MockProfileManager_UpsertProfile_Call) Run(run func(screenName string, body string)) *MockProfileManager_UpsertProfile_Call {
  79. _c.Call.Run(func(args mock.Arguments) {
  80. run(args[0].(string), args[1].(string))
  81. })
  82. return _c
  83. }
  84. func (_c *MockProfileManager_UpsertProfile_Call) Return(_a0 error) *MockProfileManager_UpsertProfile_Call {
  85. _c.Call.Return(_a0)
  86. return _c
  87. }
  88. func (_c *MockProfileManager_UpsertProfile_Call) RunAndReturn(run func(string, string) error) *MockProfileManager_UpsertProfile_Call {
  89. _c.Call.Return(run)
  90. return _c
  91. }
  92. // NewMockProfileManager creates a new instance of MockProfileManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  93. // The first argument is typically a *testing.T value.
  94. func NewMockProfileManager(t interface {
  95. mock.TestingT
  96. Cleanup(func())
  97. }) *MockProfileManager {
  98. mock := &MockProfileManager{}
  99. mock.Mock.Test(t)
  100. t.Cleanup(func() { mock.AssertExpectations(t) })
  101. return mock
  102. }