mock_locate_service_test.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package oscar
  5. import (
  6. "context"
  7. "github.com/mk6i/open-oscar-server/state"
  8. "github.com/mk6i/open-oscar-server/wire"
  9. mock "github.com/stretchr/testify/mock"
  10. )
  11. // newMockLocateService creates a new instance of mockLocateService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  12. // The first argument is typically a *testing.T value.
  13. func newMockLocateService(t interface {
  14. mock.TestingT
  15. Cleanup(func())
  16. }) *mockLocateService {
  17. mock := &mockLocateService{}
  18. mock.Mock.Test(t)
  19. t.Cleanup(func() { mock.AssertExpectations(t) })
  20. return mock
  21. }
  22. // mockLocateService is an autogenerated mock type for the LocateService type
  23. type mockLocateService struct {
  24. mock.Mock
  25. }
  26. type mockLocateService_Expecter struct {
  27. mock *mock.Mock
  28. }
  29. func (_m *mockLocateService) EXPECT() *mockLocateService_Expecter {
  30. return &mockLocateService_Expecter{mock: &_m.Mock}
  31. }
  32. // DirInfo provides a mock function for the type mockLocateService
  33. func (_mock *mockLocateService) DirInfo(ctx context.Context, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0B_LocateGetDirInfo) (wire.SNACMessage, error) {
  34. ret := _mock.Called(ctx, inFrame, inBody)
  35. if len(ret) == 0 {
  36. panic("no return value specified for DirInfo")
  37. }
  38. var r0 wire.SNACMessage
  39. var r1 error
  40. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNACFrame, wire.SNAC_0x02_0x0B_LocateGetDirInfo) (wire.SNACMessage, error)); ok {
  41. return returnFunc(ctx, inFrame, inBody)
  42. }
  43. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNACFrame, wire.SNAC_0x02_0x0B_LocateGetDirInfo) wire.SNACMessage); ok {
  44. r0 = returnFunc(ctx, inFrame, inBody)
  45. } else {
  46. r0 = ret.Get(0).(wire.SNACMessage)
  47. }
  48. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNACFrame, wire.SNAC_0x02_0x0B_LocateGetDirInfo) error); ok {
  49. r1 = returnFunc(ctx, inFrame, inBody)
  50. } else {
  51. r1 = ret.Error(1)
  52. }
  53. return r0, r1
  54. }
  55. // mockLocateService_DirInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DirInfo'
  56. type mockLocateService_DirInfo_Call struct {
  57. *mock.Call
  58. }
  59. // DirInfo is a helper method to define mock.On call
  60. // - ctx context.Context
  61. // - inFrame wire.SNACFrame
  62. // - inBody wire.SNAC_0x02_0x0B_LocateGetDirInfo
  63. func (_e *mockLocateService_Expecter) DirInfo(ctx interface{}, inFrame interface{}, inBody interface{}) *mockLocateService_DirInfo_Call {
  64. return &mockLocateService_DirInfo_Call{Call: _e.mock.On("DirInfo", ctx, inFrame, inBody)}
  65. }
  66. func (_c *mockLocateService_DirInfo_Call) Run(run func(ctx context.Context, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0B_LocateGetDirInfo)) *mockLocateService_DirInfo_Call {
  67. _c.Call.Run(func(args mock.Arguments) {
  68. var arg0 context.Context
  69. if args[0] != nil {
  70. arg0 = args[0].(context.Context)
  71. }
  72. var arg1 wire.SNACFrame
  73. if args[1] != nil {
  74. arg1 = args[1].(wire.SNACFrame)
  75. }
  76. var arg2 wire.SNAC_0x02_0x0B_LocateGetDirInfo
  77. if args[2] != nil {
  78. arg2 = args[2].(wire.SNAC_0x02_0x0B_LocateGetDirInfo)
  79. }
  80. run(
  81. arg0,
  82. arg1,
  83. arg2,
  84. )
  85. })
  86. return _c
  87. }
  88. func (_c *mockLocateService_DirInfo_Call) Return(sNACMessage wire.SNACMessage, err error) *mockLocateService_DirInfo_Call {
  89. _c.Call.Return(sNACMessage, err)
  90. return _c
  91. }
  92. func (_c *mockLocateService_DirInfo_Call) RunAndReturn(run func(ctx context.Context, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0B_LocateGetDirInfo) (wire.SNACMessage, error)) *mockLocateService_DirInfo_Call {
  93. _c.Call.Return(run)
  94. return _c
  95. }
  96. // RightsQuery provides a mock function for the type mockLocateService
  97. func (_mock *mockLocateService) RightsQuery(ctx context.Context, inFrame wire.SNACFrame) wire.SNACMessage {
  98. ret := _mock.Called(ctx, inFrame)
  99. if len(ret) == 0 {
  100. panic("no return value specified for RightsQuery")
  101. }
  102. var r0 wire.SNACMessage
  103. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNACFrame) wire.SNACMessage); ok {
  104. r0 = returnFunc(ctx, inFrame)
  105. } else {
  106. r0 = ret.Get(0).(wire.SNACMessage)
  107. }
  108. return r0
  109. }
  110. // mockLocateService_RightsQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RightsQuery'
  111. type mockLocateService_RightsQuery_Call struct {
  112. *mock.Call
  113. }
  114. // RightsQuery is a helper method to define mock.On call
  115. // - ctx context.Context
  116. // - inFrame wire.SNACFrame
  117. func (_e *mockLocateService_Expecter) RightsQuery(ctx interface{}, inFrame interface{}) *mockLocateService_RightsQuery_Call {
  118. return &mockLocateService_RightsQuery_Call{Call: _e.mock.On("RightsQuery", ctx, inFrame)}
  119. }
  120. func (_c *mockLocateService_RightsQuery_Call) Run(run func(ctx context.Context, inFrame wire.SNACFrame)) *mockLocateService_RightsQuery_Call {
  121. _c.Call.Run(func(args mock.Arguments) {
  122. var arg0 context.Context
  123. if args[0] != nil {
  124. arg0 = args[0].(context.Context)
  125. }
  126. var arg1 wire.SNACFrame
  127. if args[1] != nil {
  128. arg1 = args[1].(wire.SNACFrame)
  129. }
  130. run(
  131. arg0,
  132. arg1,
  133. )
  134. })
  135. return _c
  136. }
  137. func (_c *mockLocateService_RightsQuery_Call) Return(sNACMessage wire.SNACMessage) *mockLocateService_RightsQuery_Call {
  138. _c.Call.Return(sNACMessage)
  139. return _c
  140. }
  141. func (_c *mockLocateService_RightsQuery_Call) RunAndReturn(run func(ctx context.Context, inFrame wire.SNACFrame) wire.SNACMessage) *mockLocateService_RightsQuery_Call {
  142. _c.Call.Return(run)
  143. return _c
  144. }
  145. // SetDirInfo provides a mock function for the type mockLocateService
  146. func (_mock *mockLocateService) SetDirInfo(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x09_LocateSetDirInfo) (wire.SNACMessage, error) {
  147. ret := _mock.Called(ctx, instance, inFrame, inBody)
  148. if len(ret) == 0 {
  149. panic("no return value specified for SetDirInfo")
  150. }
  151. var r0 wire.SNACMessage
  152. var r1 error
  153. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x09_LocateSetDirInfo) (wire.SNACMessage, error)); ok {
  154. return returnFunc(ctx, instance, inFrame, inBody)
  155. }
  156. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x09_LocateSetDirInfo) wire.SNACMessage); ok {
  157. r0 = returnFunc(ctx, instance, inFrame, inBody)
  158. } else {
  159. r0 = ret.Get(0).(wire.SNACMessage)
  160. }
  161. if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x09_LocateSetDirInfo) error); ok {
  162. r1 = returnFunc(ctx, instance, inFrame, inBody)
  163. } else {
  164. r1 = ret.Error(1)
  165. }
  166. return r0, r1
  167. }
  168. // mockLocateService_SetDirInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDirInfo'
  169. type mockLocateService_SetDirInfo_Call struct {
  170. *mock.Call
  171. }
  172. // SetDirInfo is a helper method to define mock.On call
  173. // - ctx context.Context
  174. // - instance *state.SessionInstance
  175. // - inFrame wire.SNACFrame
  176. // - inBody wire.SNAC_0x02_0x09_LocateSetDirInfo
  177. func (_e *mockLocateService_Expecter) SetDirInfo(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockLocateService_SetDirInfo_Call {
  178. return &mockLocateService_SetDirInfo_Call{Call: _e.mock.On("SetDirInfo", ctx, instance, inFrame, inBody)}
  179. }
  180. func (_c *mockLocateService_SetDirInfo_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x09_LocateSetDirInfo)) *mockLocateService_SetDirInfo_Call {
  181. _c.Call.Run(func(args mock.Arguments) {
  182. var arg0 context.Context
  183. if args[0] != nil {
  184. arg0 = args[0].(context.Context)
  185. }
  186. var arg1 *state.SessionInstance
  187. if args[1] != nil {
  188. arg1 = args[1].(*state.SessionInstance)
  189. }
  190. var arg2 wire.SNACFrame
  191. if args[2] != nil {
  192. arg2 = args[2].(wire.SNACFrame)
  193. }
  194. var arg3 wire.SNAC_0x02_0x09_LocateSetDirInfo
  195. if args[3] != nil {
  196. arg3 = args[3].(wire.SNAC_0x02_0x09_LocateSetDirInfo)
  197. }
  198. run(
  199. arg0,
  200. arg1,
  201. arg2,
  202. arg3,
  203. )
  204. })
  205. return _c
  206. }
  207. func (_c *mockLocateService_SetDirInfo_Call) Return(sNACMessage wire.SNACMessage, err error) *mockLocateService_SetDirInfo_Call {
  208. _c.Call.Return(sNACMessage, err)
  209. return _c
  210. }
  211. func (_c *mockLocateService_SetDirInfo_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x09_LocateSetDirInfo) (wire.SNACMessage, error)) *mockLocateService_SetDirInfo_Call {
  212. _c.Call.Return(run)
  213. return _c
  214. }
  215. // SetInfo provides a mock function for the type mockLocateService
  216. func (_mock *mockLocateService) SetInfo(ctx context.Context, instance *state.SessionInstance, inBody wire.SNAC_0x02_0x04_LocateSetInfo) error {
  217. ret := _mock.Called(ctx, instance, inBody)
  218. if len(ret) == 0 {
  219. panic("no return value specified for SetInfo")
  220. }
  221. var r0 error
  222. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNAC_0x02_0x04_LocateSetInfo) error); ok {
  223. r0 = returnFunc(ctx, instance, inBody)
  224. } else {
  225. r0 = ret.Error(0)
  226. }
  227. return r0
  228. }
  229. // mockLocateService_SetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetInfo'
  230. type mockLocateService_SetInfo_Call struct {
  231. *mock.Call
  232. }
  233. // SetInfo is a helper method to define mock.On call
  234. // - ctx context.Context
  235. // - instance *state.SessionInstance
  236. // - inBody wire.SNAC_0x02_0x04_LocateSetInfo
  237. func (_e *mockLocateService_Expecter) SetInfo(ctx interface{}, instance interface{}, inBody interface{}) *mockLocateService_SetInfo_Call {
  238. return &mockLocateService_SetInfo_Call{Call: _e.mock.On("SetInfo", ctx, instance, inBody)}
  239. }
  240. func (_c *mockLocateService_SetInfo_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inBody wire.SNAC_0x02_0x04_LocateSetInfo)) *mockLocateService_SetInfo_Call {
  241. _c.Call.Run(func(args mock.Arguments) {
  242. var arg0 context.Context
  243. if args[0] != nil {
  244. arg0 = args[0].(context.Context)
  245. }
  246. var arg1 *state.SessionInstance
  247. if args[1] != nil {
  248. arg1 = args[1].(*state.SessionInstance)
  249. }
  250. var arg2 wire.SNAC_0x02_0x04_LocateSetInfo
  251. if args[2] != nil {
  252. arg2 = args[2].(wire.SNAC_0x02_0x04_LocateSetInfo)
  253. }
  254. run(
  255. arg0,
  256. arg1,
  257. arg2,
  258. )
  259. })
  260. return _c
  261. }
  262. func (_c *mockLocateService_SetInfo_Call) Return(err error) *mockLocateService_SetInfo_Call {
  263. _c.Call.Return(err)
  264. return _c
  265. }
  266. func (_c *mockLocateService_SetInfo_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inBody wire.SNAC_0x02_0x04_LocateSetInfo) error) *mockLocateService_SetInfo_Call {
  267. _c.Call.Return(run)
  268. return _c
  269. }
  270. // SetKeywordInfo provides a mock function for the type mockLocateService
  271. func (_mock *mockLocateService) SetKeywordInfo(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0F_LocateSetKeywordInfo) (wire.SNACMessage, error) {
  272. ret := _mock.Called(ctx, instance, inFrame, inBody)
  273. if len(ret) == 0 {
  274. panic("no return value specified for SetKeywordInfo")
  275. }
  276. var r0 wire.SNACMessage
  277. var r1 error
  278. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x0F_LocateSetKeywordInfo) (wire.SNACMessage, error)); ok {
  279. return returnFunc(ctx, instance, inFrame, inBody)
  280. }
  281. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x0F_LocateSetKeywordInfo) wire.SNACMessage); ok {
  282. r0 = returnFunc(ctx, instance, inFrame, inBody)
  283. } else {
  284. r0 = ret.Get(0).(wire.SNACMessage)
  285. }
  286. if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x0F_LocateSetKeywordInfo) error); ok {
  287. r1 = returnFunc(ctx, instance, inFrame, inBody)
  288. } else {
  289. r1 = ret.Error(1)
  290. }
  291. return r0, r1
  292. }
  293. // mockLocateService_SetKeywordInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKeywordInfo'
  294. type mockLocateService_SetKeywordInfo_Call struct {
  295. *mock.Call
  296. }
  297. // SetKeywordInfo is a helper method to define mock.On call
  298. // - ctx context.Context
  299. // - instance *state.SessionInstance
  300. // - inFrame wire.SNACFrame
  301. // - inBody wire.SNAC_0x02_0x0F_LocateSetKeywordInfo
  302. func (_e *mockLocateService_Expecter) SetKeywordInfo(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockLocateService_SetKeywordInfo_Call {
  303. return &mockLocateService_SetKeywordInfo_Call{Call: _e.mock.On("SetKeywordInfo", ctx, instance, inFrame, inBody)}
  304. }
  305. func (_c *mockLocateService_SetKeywordInfo_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0F_LocateSetKeywordInfo)) *mockLocateService_SetKeywordInfo_Call {
  306. _c.Call.Run(func(args mock.Arguments) {
  307. var arg0 context.Context
  308. if args[0] != nil {
  309. arg0 = args[0].(context.Context)
  310. }
  311. var arg1 *state.SessionInstance
  312. if args[1] != nil {
  313. arg1 = args[1].(*state.SessionInstance)
  314. }
  315. var arg2 wire.SNACFrame
  316. if args[2] != nil {
  317. arg2 = args[2].(wire.SNACFrame)
  318. }
  319. var arg3 wire.SNAC_0x02_0x0F_LocateSetKeywordInfo
  320. if args[3] != nil {
  321. arg3 = args[3].(wire.SNAC_0x02_0x0F_LocateSetKeywordInfo)
  322. }
  323. run(
  324. arg0,
  325. arg1,
  326. arg2,
  327. arg3,
  328. )
  329. })
  330. return _c
  331. }
  332. func (_c *mockLocateService_SetKeywordInfo_Call) Return(sNACMessage wire.SNACMessage, err error) *mockLocateService_SetKeywordInfo_Call {
  333. _c.Call.Return(sNACMessage, err)
  334. return _c
  335. }
  336. func (_c *mockLocateService_SetKeywordInfo_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x0F_LocateSetKeywordInfo) (wire.SNACMessage, error)) *mockLocateService_SetKeywordInfo_Call {
  337. _c.Call.Return(run)
  338. return _c
  339. }
  340. // UserInfoQuery provides a mock function for the type mockLocateService
  341. func (_mock *mockLocateService) UserInfoQuery(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x05_LocateUserInfoQuery) (wire.SNACMessage, error) {
  342. ret := _mock.Called(ctx, instance, inFrame, inBody)
  343. if len(ret) == 0 {
  344. panic("no return value specified for UserInfoQuery")
  345. }
  346. var r0 wire.SNACMessage
  347. var r1 error
  348. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x05_LocateUserInfoQuery) (wire.SNACMessage, error)); ok {
  349. return returnFunc(ctx, instance, inFrame, inBody)
  350. }
  351. if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x05_LocateUserInfoQuery) wire.SNACMessage); ok {
  352. r0 = returnFunc(ctx, instance, inFrame, inBody)
  353. } else {
  354. r0 = ret.Get(0).(wire.SNACMessage)
  355. }
  356. if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x02_0x05_LocateUserInfoQuery) error); ok {
  357. r1 = returnFunc(ctx, instance, inFrame, inBody)
  358. } else {
  359. r1 = ret.Error(1)
  360. }
  361. return r0, r1
  362. }
  363. // mockLocateService_UserInfoQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserInfoQuery'
  364. type mockLocateService_UserInfoQuery_Call struct {
  365. *mock.Call
  366. }
  367. // UserInfoQuery is a helper method to define mock.On call
  368. // - ctx context.Context
  369. // - instance *state.SessionInstance
  370. // - inFrame wire.SNACFrame
  371. // - inBody wire.SNAC_0x02_0x05_LocateUserInfoQuery
  372. func (_e *mockLocateService_Expecter) UserInfoQuery(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockLocateService_UserInfoQuery_Call {
  373. return &mockLocateService_UserInfoQuery_Call{Call: _e.mock.On("UserInfoQuery", ctx, instance, inFrame, inBody)}
  374. }
  375. func (_c *mockLocateService_UserInfoQuery_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x05_LocateUserInfoQuery)) *mockLocateService_UserInfoQuery_Call {
  376. _c.Call.Run(func(args mock.Arguments) {
  377. var arg0 context.Context
  378. if args[0] != nil {
  379. arg0 = args[0].(context.Context)
  380. }
  381. var arg1 *state.SessionInstance
  382. if args[1] != nil {
  383. arg1 = args[1].(*state.SessionInstance)
  384. }
  385. var arg2 wire.SNACFrame
  386. if args[2] != nil {
  387. arg2 = args[2].(wire.SNACFrame)
  388. }
  389. var arg3 wire.SNAC_0x02_0x05_LocateUserInfoQuery
  390. if args[3] != nil {
  391. arg3 = args[3].(wire.SNAC_0x02_0x05_LocateUserInfoQuery)
  392. }
  393. run(
  394. arg0,
  395. arg1,
  396. arg2,
  397. arg3,
  398. )
  399. })
  400. return _c
  401. }
  402. func (_c *mockLocateService_UserInfoQuery_Call) Return(sNACMessage wire.SNACMessage, err error) *mockLocateService_UserInfoQuery_Call {
  403. _c.Call.Return(sNACMessage, err)
  404. return _c
  405. }
  406. func (_c *mockLocateService_UserInfoQuery_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x02_0x05_LocateUserInfoQuery) (wire.SNACMessage, error)) *mockLocateService_UserInfoQuery_Call {
  407. _c.Call.Return(run)
  408. return _c
  409. }