mock_bart_asset_manager_test.go 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. // Code generated by mockery v2.53.3. DO NOT EDIT.
  2. package http
  3. import (
  4. context "context"
  5. state "github.com/mk6i/retro-aim-server/state"
  6. mock "github.com/stretchr/testify/mock"
  7. )
  8. // mockBARTAssetManager is an autogenerated mock type for the BARTAssetManager type
  9. type mockBARTAssetManager struct {
  10. mock.Mock
  11. }
  12. type mockBARTAssetManager_Expecter struct {
  13. mock *mock.Mock
  14. }
  15. func (_m *mockBARTAssetManager) EXPECT() *mockBARTAssetManager_Expecter {
  16. return &mockBARTAssetManager_Expecter{mock: &_m.Mock}
  17. }
  18. // BARTItem provides a mock function with given fields: ctx, hash
  19. func (_m *mockBARTAssetManager) BARTItem(ctx context.Context, hash []byte) ([]byte, error) {
  20. ret := _m.Called(ctx, hash)
  21. if len(ret) == 0 {
  22. panic("no return value specified for BARTItem")
  23. }
  24. var r0 []byte
  25. var r1 error
  26. if rf, ok := ret.Get(0).(func(context.Context, []byte) ([]byte, error)); ok {
  27. return rf(ctx, hash)
  28. }
  29. if rf, ok := ret.Get(0).(func(context.Context, []byte) []byte); ok {
  30. r0 = rf(ctx, hash)
  31. } else {
  32. if ret.Get(0) != nil {
  33. r0 = ret.Get(0).([]byte)
  34. }
  35. }
  36. if rf, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
  37. r1 = rf(ctx, hash)
  38. } else {
  39. r1 = ret.Error(1)
  40. }
  41. return r0, r1
  42. }
  43. // mockBARTAssetManager_BARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BARTItem'
  44. type mockBARTAssetManager_BARTItem_Call struct {
  45. *mock.Call
  46. }
  47. // BARTItem is a helper method to define mock.On call
  48. // - ctx context.Context
  49. // - hash []byte
  50. func (_e *mockBARTAssetManager_Expecter) BARTItem(ctx interface{}, hash interface{}) *mockBARTAssetManager_BARTItem_Call {
  51. return &mockBARTAssetManager_BARTItem_Call{Call: _e.mock.On("BARTItem", ctx, hash)}
  52. }
  53. func (_c *mockBARTAssetManager_BARTItem_Call) Run(run func(ctx context.Context, hash []byte)) *mockBARTAssetManager_BARTItem_Call {
  54. _c.Call.Run(func(args mock.Arguments) {
  55. run(args[0].(context.Context), args[1].([]byte))
  56. })
  57. return _c
  58. }
  59. func (_c *mockBARTAssetManager_BARTItem_Call) Return(_a0 []byte, _a1 error) *mockBARTAssetManager_BARTItem_Call {
  60. _c.Call.Return(_a0, _a1)
  61. return _c
  62. }
  63. func (_c *mockBARTAssetManager_BARTItem_Call) RunAndReturn(run func(context.Context, []byte) ([]byte, error)) *mockBARTAssetManager_BARTItem_Call {
  64. _c.Call.Return(run)
  65. return _c
  66. }
  67. // DeleteBARTItem provides a mock function with given fields: ctx, hash
  68. func (_m *mockBARTAssetManager) DeleteBARTItem(ctx context.Context, hash []byte) error {
  69. ret := _m.Called(ctx, hash)
  70. if len(ret) == 0 {
  71. panic("no return value specified for DeleteBARTItem")
  72. }
  73. var r0 error
  74. if rf, ok := ret.Get(0).(func(context.Context, []byte) error); ok {
  75. r0 = rf(ctx, hash)
  76. } else {
  77. r0 = ret.Error(0)
  78. }
  79. return r0
  80. }
  81. // mockBARTAssetManager_DeleteBARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBARTItem'
  82. type mockBARTAssetManager_DeleteBARTItem_Call struct {
  83. *mock.Call
  84. }
  85. // DeleteBARTItem is a helper method to define mock.On call
  86. // - ctx context.Context
  87. // - hash []byte
  88. func (_e *mockBARTAssetManager_Expecter) DeleteBARTItem(ctx interface{}, hash interface{}) *mockBARTAssetManager_DeleteBARTItem_Call {
  89. return &mockBARTAssetManager_DeleteBARTItem_Call{Call: _e.mock.On("DeleteBARTItem", ctx, hash)}
  90. }
  91. func (_c *mockBARTAssetManager_DeleteBARTItem_Call) Run(run func(ctx context.Context, hash []byte)) *mockBARTAssetManager_DeleteBARTItem_Call {
  92. _c.Call.Run(func(args mock.Arguments) {
  93. run(args[0].(context.Context), args[1].([]byte))
  94. })
  95. return _c
  96. }
  97. func (_c *mockBARTAssetManager_DeleteBARTItem_Call) Return(_a0 error) *mockBARTAssetManager_DeleteBARTItem_Call {
  98. _c.Call.Return(_a0)
  99. return _c
  100. }
  101. func (_c *mockBARTAssetManager_DeleteBARTItem_Call) RunAndReturn(run func(context.Context, []byte) error) *mockBARTAssetManager_DeleteBARTItem_Call {
  102. _c.Call.Return(run)
  103. return _c
  104. }
  105. // InsertBARTItem provides a mock function with given fields: ctx, hash, blob, itemType
  106. func (_m *mockBARTAssetManager) InsertBARTItem(ctx context.Context, hash []byte, blob []byte, itemType uint16) error {
  107. ret := _m.Called(ctx, hash, blob, itemType)
  108. if len(ret) == 0 {
  109. panic("no return value specified for InsertBARTItem")
  110. }
  111. var r0 error
  112. if rf, ok := ret.Get(0).(func(context.Context, []byte, []byte, uint16) error); ok {
  113. r0 = rf(ctx, hash, blob, itemType)
  114. } else {
  115. r0 = ret.Error(0)
  116. }
  117. return r0
  118. }
  119. // mockBARTAssetManager_InsertBARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertBARTItem'
  120. type mockBARTAssetManager_InsertBARTItem_Call struct {
  121. *mock.Call
  122. }
  123. // InsertBARTItem is a helper method to define mock.On call
  124. // - ctx context.Context
  125. // - hash []byte
  126. // - blob []byte
  127. // - itemType uint16
  128. func (_e *mockBARTAssetManager_Expecter) InsertBARTItem(ctx interface{}, hash interface{}, blob interface{}, itemType interface{}) *mockBARTAssetManager_InsertBARTItem_Call {
  129. return &mockBARTAssetManager_InsertBARTItem_Call{Call: _e.mock.On("InsertBARTItem", ctx, hash, blob, itemType)}
  130. }
  131. func (_c *mockBARTAssetManager_InsertBARTItem_Call) Run(run func(ctx context.Context, hash []byte, blob []byte, itemType uint16)) *mockBARTAssetManager_InsertBARTItem_Call {
  132. _c.Call.Run(func(args mock.Arguments) {
  133. run(args[0].(context.Context), args[1].([]byte), args[2].([]byte), args[3].(uint16))
  134. })
  135. return _c
  136. }
  137. func (_c *mockBARTAssetManager_InsertBARTItem_Call) Return(_a0 error) *mockBARTAssetManager_InsertBARTItem_Call {
  138. _c.Call.Return(_a0)
  139. return _c
  140. }
  141. func (_c *mockBARTAssetManager_InsertBARTItem_Call) RunAndReturn(run func(context.Context, []byte, []byte, uint16) error) *mockBARTAssetManager_InsertBARTItem_Call {
  142. _c.Call.Return(run)
  143. return _c
  144. }
  145. // ListBARTItems provides a mock function with given fields: ctx, itemType
  146. func (_m *mockBARTAssetManager) ListBARTItems(ctx context.Context, itemType uint16) ([]state.BARTItem, error) {
  147. ret := _m.Called(ctx, itemType)
  148. if len(ret) == 0 {
  149. panic("no return value specified for ListBARTItems")
  150. }
  151. var r0 []state.BARTItem
  152. var r1 error
  153. if rf, ok := ret.Get(0).(func(context.Context, uint16) ([]state.BARTItem, error)); ok {
  154. return rf(ctx, itemType)
  155. }
  156. if rf, ok := ret.Get(0).(func(context.Context, uint16) []state.BARTItem); ok {
  157. r0 = rf(ctx, itemType)
  158. } else {
  159. if ret.Get(0) != nil {
  160. r0 = ret.Get(0).([]state.BARTItem)
  161. }
  162. }
  163. if rf, ok := ret.Get(1).(func(context.Context, uint16) error); ok {
  164. r1 = rf(ctx, itemType)
  165. } else {
  166. r1 = ret.Error(1)
  167. }
  168. return r0, r1
  169. }
  170. // mockBARTAssetManager_ListBARTItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBARTItems'
  171. type mockBARTAssetManager_ListBARTItems_Call struct {
  172. *mock.Call
  173. }
  174. // ListBARTItems is a helper method to define mock.On call
  175. // - ctx context.Context
  176. // - itemType uint16
  177. func (_e *mockBARTAssetManager_Expecter) ListBARTItems(ctx interface{}, itemType interface{}) *mockBARTAssetManager_ListBARTItems_Call {
  178. return &mockBARTAssetManager_ListBARTItems_Call{Call: _e.mock.On("ListBARTItems", ctx, itemType)}
  179. }
  180. func (_c *mockBARTAssetManager_ListBARTItems_Call) Run(run func(ctx context.Context, itemType uint16)) *mockBARTAssetManager_ListBARTItems_Call {
  181. _c.Call.Run(func(args mock.Arguments) {
  182. run(args[0].(context.Context), args[1].(uint16))
  183. })
  184. return _c
  185. }
  186. func (_c *mockBARTAssetManager_ListBARTItems_Call) Return(_a0 []state.BARTItem, _a1 error) *mockBARTAssetManager_ListBARTItems_Call {
  187. _c.Call.Return(_a0, _a1)
  188. return _c
  189. }
  190. func (_c *mockBARTAssetManager_ListBARTItems_Call) RunAndReturn(run func(context.Context, uint16) ([]state.BARTItem, error)) *mockBARTAssetManager_ListBARTItems_Call {
  191. _c.Call.Return(run)
  192. return _c
  193. }
  194. // newMockBARTAssetManager creates a new instance of mockBARTAssetManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  195. // The first argument is typically a *testing.T value.
  196. func newMockBARTAssetManager(t interface {
  197. mock.TestingT
  198. Cleanup(func())
  199. }) *mockBARTAssetManager {
  200. mock := &mockBARTAssetManager{}
  201. mock.Mock.Test(t)
  202. t.Cleanup(func() { mock.AssertExpectations(t) })
  203. return mock
  204. }