mock_toc_config_store_test.go 4.5 KB

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