4
0

mock_auth_service_test.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package toc
  5. import (
  6. "context"
  7. "github.com/google/uuid"
  8. "github.com/mk6i/open-oscar-server/config"
  9. "github.com/mk6i/open-oscar-server/state"
  10. "github.com/mk6i/open-oscar-server/wire"
  11. mock "github.com/stretchr/testify/mock"
  12. )
  13. // newMockAuthService creates a new instance of mockAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  14. // The first argument is typically a *testing.T value.
  15. func newMockAuthService(t interface {
  16. mock.TestingT
  17. Cleanup(func())
  18. }) *mockAuthService {
  19. mock := &mockAuthService{}
  20. mock.Mock.Test(t)
  21. t.Cleanup(func() { mock.AssertExpectations(t) })
  22. return mock
  23. }
  24. // mockAuthService is an autogenerated mock type for the AuthService type
  25. type mockAuthService struct {
  26. mock.Mock
  27. }
  28. type mockAuthService_Expecter struct {
  29. mock *mock.Mock
  30. }
  31. func (_m *mockAuthService) EXPECT() *mockAuthService_Expecter {
  32. return &mockAuthService_Expecter{mock: &_m.Mock}
  33. }
  34. // BUCPChallenge provides a mock function for the type mockAuthService
  35. func (_mock *mockAuthService) BUCPChallenge(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error) {
  36. ret := _mock.Called(ctx, inBody, newUUID)
  37. if len(ret) == 0 {
  38. panic("no return value specified for BUCPChallenge")
  39. }
  40. var r0 wire.SNACMessage
  41. var r1 error
  42. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) (wire.SNACMessage, error)); ok {
  43. return returnFunc(ctx, inBody, newUUID)
  44. }
  45. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) wire.SNACMessage); ok {
  46. r0 = returnFunc(ctx, inBody, newUUID)
  47. } else {
  48. r0 = ret.Get(0).(wire.SNACMessage)
  49. }
  50. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) error); ok {
  51. r1 = returnFunc(ctx, inBody, newUUID)
  52. } else {
  53. r1 = ret.Error(1)
  54. }
  55. return r0, r1
  56. }
  57. // mockAuthService_BUCPChallenge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BUCPChallenge'
  58. type mockAuthService_BUCPChallenge_Call struct {
  59. *mock.Call
  60. }
  61. // BUCPChallenge is a helper method to define mock.On call
  62. // - ctx context.Context
  63. // - inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest
  64. // - newUUID func() uuid.UUID
  65. func (_e *mockAuthService_Expecter) BUCPChallenge(ctx interface{}, inBody interface{}, newUUID interface{}) *mockAuthService_BUCPChallenge_Call {
  66. return &mockAuthService_BUCPChallenge_Call{Call: _e.mock.On("BUCPChallenge", ctx, inBody, newUUID)}
  67. }
  68. func (_c *mockAuthService_BUCPChallenge_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID)) *mockAuthService_BUCPChallenge_Call {
  69. _c.Call.Run(func(args mock.Arguments) {
  70. var arg0 context.Context
  71. if args[0] != nil {
  72. arg0 = args[0].(context.Context)
  73. }
  74. var arg1 wire.SNAC_0x17_0x06_BUCPChallengeRequest
  75. if args[1] != nil {
  76. arg1 = args[1].(wire.SNAC_0x17_0x06_BUCPChallengeRequest)
  77. }
  78. var arg2 func() uuid.UUID
  79. if args[2] != nil {
  80. arg2 = args[2].(func() uuid.UUID)
  81. }
  82. run(
  83. arg0,
  84. arg1,
  85. arg2,
  86. )
  87. })
  88. return _c
  89. }
  90. func (_c *mockAuthService_BUCPChallenge_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPChallenge_Call {
  91. _c.Call.Return(sNACMessage, err)
  92. return _c
  93. }
  94. func (_c *mockAuthService_BUCPChallenge_Call) RunAndReturn(run func(ctx context.Context, inBody wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error)) *mockAuthService_BUCPChallenge_Call {
  95. _c.Call.Return(run)
  96. return _c
  97. }
  98. // BUCPLogin provides a mock function for the type mockAuthService
  99. func (_mock *mockAuthService) BUCPLogin(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint) (wire.SNACMessage, error) {
  100. ret := _mock.Called(ctx, inBody, endpointCfg)
  101. if len(ret) == 0 {
  102. panic("no return value specified for BUCPLogin")
  103. }
  104. var r0 wire.SNACMessage
  105. var r1 error
  106. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) (wire.SNACMessage, error)); ok {
  107. return returnFunc(ctx, inBody, endpointCfg)
  108. }
  109. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) wire.SNACMessage); ok {
  110. r0 = returnFunc(ctx, inBody, endpointCfg)
  111. } else {
  112. r0 = ret.Get(0).(wire.SNACMessage)
  113. }
  114. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, config.Endpoint) error); ok {
  115. r1 = returnFunc(ctx, inBody, endpointCfg)
  116. } else {
  117. r1 = ret.Error(1)
  118. }
  119. return r0, r1
  120. }
  121. // mockAuthService_BUCPLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BUCPLogin'
  122. type mockAuthService_BUCPLogin_Call struct {
  123. *mock.Call
  124. }
  125. // BUCPLogin is a helper method to define mock.On call
  126. // - ctx context.Context
  127. // - inBody wire.SNAC_0x17_0x02_BUCPLoginRequest
  128. // - endpointCfg config.Endpoint
  129. func (_e *mockAuthService_Expecter) BUCPLogin(ctx interface{}, inBody interface{}, endpointCfg interface{}) *mockAuthService_BUCPLogin_Call {
  130. return &mockAuthService_BUCPLogin_Call{Call: _e.mock.On("BUCPLogin", ctx, inBody, endpointCfg)}
  131. }
  132. func (_c *mockAuthService_BUCPLogin_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint)) *mockAuthService_BUCPLogin_Call {
  133. _c.Call.Run(func(args mock.Arguments) {
  134. var arg0 context.Context
  135. if args[0] != nil {
  136. arg0 = args[0].(context.Context)
  137. }
  138. var arg1 wire.SNAC_0x17_0x02_BUCPLoginRequest
  139. if args[1] != nil {
  140. arg1 = args[1].(wire.SNAC_0x17_0x02_BUCPLoginRequest)
  141. }
  142. var arg2 config.Endpoint
  143. if args[2] != nil {
  144. arg2 = args[2].(config.Endpoint)
  145. }
  146. run(
  147. arg0,
  148. arg1,
  149. arg2,
  150. )
  151. })
  152. return _c
  153. }
  154. func (_c *mockAuthService_BUCPLogin_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPLogin_Call {
  155. _c.Call.Return(sNACMessage, err)
  156. return _c
  157. }
  158. func (_c *mockAuthService_BUCPLogin_Call) RunAndReturn(run func(ctx context.Context, inBody wire.SNAC_0x17_0x02_BUCPLoginRequest, endpointCfg config.Endpoint) (wire.SNACMessage, error)) *mockAuthService_BUCPLogin_Call {
  159. _c.Call.Return(run)
  160. return _c
  161. }
  162. // CrackCookie provides a mock function for the type mockAuthService
  163. func (_mock *mockAuthService) CrackCookie(authCookie []byte) (state.ServerCookie, error) {
  164. ret := _mock.Called(authCookie)
  165. if len(ret) == 0 {
  166. panic("no return value specified for CrackCookie")
  167. }
  168. var r0 state.ServerCookie
  169. var r1 error
  170. if returnFunc, ok := ret.Get(0).(func([]byte) (state.ServerCookie, error)); ok {
  171. return returnFunc(authCookie)
  172. }
  173. if returnFunc, ok := ret.Get(0).(func([]byte) state.ServerCookie); ok {
  174. r0 = returnFunc(authCookie)
  175. } else {
  176. r0 = ret.Get(0).(state.ServerCookie)
  177. }
  178. if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
  179. r1 = returnFunc(authCookie)
  180. } else {
  181. r1 = ret.Error(1)
  182. }
  183. return r0, r1
  184. }
  185. // mockAuthService_CrackCookie_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CrackCookie'
  186. type mockAuthService_CrackCookie_Call struct {
  187. *mock.Call
  188. }
  189. // CrackCookie is a helper method to define mock.On call
  190. // - authCookie []byte
  191. func (_e *mockAuthService_Expecter) CrackCookie(authCookie interface{}) *mockAuthService_CrackCookie_Call {
  192. return &mockAuthService_CrackCookie_Call{Call: _e.mock.On("CrackCookie", authCookie)}
  193. }
  194. func (_c *mockAuthService_CrackCookie_Call) Run(run func(authCookie []byte)) *mockAuthService_CrackCookie_Call {
  195. _c.Call.Run(func(args mock.Arguments) {
  196. var arg0 []byte
  197. if args[0] != nil {
  198. arg0 = args[0].([]byte)
  199. }
  200. run(
  201. arg0,
  202. )
  203. })
  204. return _c
  205. }
  206. func (_c *mockAuthService_CrackCookie_Call) Return(serverCookie state.ServerCookie, err error) *mockAuthService_CrackCookie_Call {
  207. _c.Call.Return(serverCookie, err)
  208. return _c
  209. }
  210. func (_c *mockAuthService_CrackCookie_Call) RunAndReturn(run func(authCookie []byte) (state.ServerCookie, error)) *mockAuthService_CrackCookie_Call {
  211. _c.Call.Return(run)
  212. return _c
  213. }
  214. // FLAPLogin provides a mock function for the type mockAuthService
  215. func (_mock *mockAuthService) FLAPLogin(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint) (wire.TLVRestBlock, error) {
  216. ret := _mock.Called(ctx, inFrame, endpointCfg)
  217. if len(ret) == 0 {
  218. panic("no return value specified for FLAPLogin")
  219. }
  220. var r0 wire.TLVRestBlock
  221. var r1 error
  222. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) (wire.TLVRestBlock, error)); ok {
  223. return returnFunc(ctx, inFrame, endpointCfg)
  224. }
  225. if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) wire.TLVRestBlock); ok {
  226. r0 = returnFunc(ctx, inFrame, endpointCfg)
  227. } else {
  228. r0 = ret.Get(0).(wire.TLVRestBlock)
  229. }
  230. if returnFunc, ok := ret.Get(1).(func(context.Context, wire.FLAPSignonFrame, config.Endpoint) error); ok {
  231. r1 = returnFunc(ctx, inFrame, endpointCfg)
  232. } else {
  233. r1 = ret.Error(1)
  234. }
  235. return r0, r1
  236. }
  237. // mockAuthService_FLAPLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FLAPLogin'
  238. type mockAuthService_FLAPLogin_Call struct {
  239. *mock.Call
  240. }
  241. // FLAPLogin is a helper method to define mock.On call
  242. // - ctx context.Context
  243. // - inFrame wire.FLAPSignonFrame
  244. // - endpointCfg config.Endpoint
  245. func (_e *mockAuthService_Expecter) FLAPLogin(ctx interface{}, inFrame interface{}, endpointCfg interface{}) *mockAuthService_FLAPLogin_Call {
  246. return &mockAuthService_FLAPLogin_Call{Call: _e.mock.On("FLAPLogin", ctx, inFrame, endpointCfg)}
  247. }
  248. func (_c *mockAuthService_FLAPLogin_Call) Run(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint)) *mockAuthService_FLAPLogin_Call {
  249. _c.Call.Run(func(args mock.Arguments) {
  250. var arg0 context.Context
  251. if args[0] != nil {
  252. arg0 = args[0].(context.Context)
  253. }
  254. var arg1 wire.FLAPSignonFrame
  255. if args[1] != nil {
  256. arg1 = args[1].(wire.FLAPSignonFrame)
  257. }
  258. var arg2 config.Endpoint
  259. if args[2] != nil {
  260. arg2 = args[2].(config.Endpoint)
  261. }
  262. run(
  263. arg0,
  264. arg1,
  265. arg2,
  266. )
  267. })
  268. return _c
  269. }
  270. func (_c *mockAuthService_FLAPLogin_Call) Return(tLVRestBlock wire.TLVRestBlock, err error) *mockAuthService_FLAPLogin_Call {
  271. _c.Call.Return(tLVRestBlock, err)
  272. return _c
  273. }
  274. func (_c *mockAuthService_FLAPLogin_Call) RunAndReturn(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, endpointCfg config.Endpoint) (wire.TLVRestBlock, error)) *mockAuthService_FLAPLogin_Call {
  275. _c.Call.Return(run)
  276. return _c
  277. }
  278. // RegisterBOSSession provides a mock function for the type mockAuthService
  279. func (_mock *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error) {
  280. ret := _mock.Called(ctx, authCookie, cfg)
  281. if len(ret) == 0 {
  282. panic("no return value specified for RegisterBOSSession")
  283. }
  284. var r0 *state.SessionInstance
  285. var r1 error
  286. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) (*state.SessionInstance, error)); ok {
  287. return returnFunc(ctx, authCookie, cfg)
  288. }
  289. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) *state.SessionInstance); ok {
  290. r0 = returnFunc(ctx, authCookie, cfg)
  291. } else {
  292. if ret.Get(0) != nil {
  293. r0 = ret.Get(0).(*state.SessionInstance)
  294. }
  295. }
  296. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie, func(*state.Session)) error); ok {
  297. r1 = returnFunc(ctx, authCookie, cfg)
  298. } else {
  299. r1 = ret.Error(1)
  300. }
  301. return r0, r1
  302. }
  303. // mockAuthService_RegisterBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterBOSSession'
  304. type mockAuthService_RegisterBOSSession_Call struct {
  305. *mock.Call
  306. }
  307. // RegisterBOSSession is a helper method to define mock.On call
  308. // - ctx context.Context
  309. // - authCookie state.ServerCookie
  310. // - cfg func(*state.Session)
  311. func (_e *mockAuthService_Expecter) RegisterBOSSession(ctx interface{}, authCookie interface{}, cfg interface{}) *mockAuthService_RegisterBOSSession_Call {
  312. return &mockAuthService_RegisterBOSSession_Call{Call: _e.mock.On("RegisterBOSSession", ctx, authCookie, cfg)}
  313. }
  314. func (_c *mockAuthService_RegisterBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session))) *mockAuthService_RegisterBOSSession_Call {
  315. _c.Call.Run(func(args mock.Arguments) {
  316. var arg0 context.Context
  317. if args[0] != nil {
  318. arg0 = args[0].(context.Context)
  319. }
  320. var arg1 state.ServerCookie
  321. if args[1] != nil {
  322. arg1 = args[1].(state.ServerCookie)
  323. }
  324. var arg2 func(*state.Session)
  325. if args[2] != nil {
  326. arg2 = args[2].(func(*state.Session))
  327. }
  328. run(
  329. arg0,
  330. arg1,
  331. arg2,
  332. )
  333. })
  334. return _c
  335. }
  336. func (_c *mockAuthService_RegisterBOSSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RegisterBOSSession_Call {
  337. _c.Call.Return(sessionInstance, err)
  338. return _c
  339. }
  340. func (_c *mockAuthService_RegisterBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error)) *mockAuthService_RegisterBOSSession_Call {
  341. _c.Call.Return(run)
  342. return _c
  343. }
  344. // RegisterChatSession provides a mock function for the type mockAuthService
  345. func (_mock *mockAuthService) RegisterChatSession(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session)) (*state.SessionInstance, error) {
  346. ret := _mock.Called(ctx, authCookie, cfg)
  347. if len(ret) == 0 {
  348. panic("no return value specified for RegisterChatSession")
  349. }
  350. var r0 *state.SessionInstance
  351. var r1 error
  352. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(sess *state.Session)) (*state.SessionInstance, error)); ok {
  353. return returnFunc(ctx, authCookie, cfg)
  354. }
  355. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(sess *state.Session)) *state.SessionInstance); ok {
  356. r0 = returnFunc(ctx, authCookie, cfg)
  357. } else {
  358. if ret.Get(0) != nil {
  359. r0 = ret.Get(0).(*state.SessionInstance)
  360. }
  361. }
  362. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie, func(sess *state.Session)) error); ok {
  363. r1 = returnFunc(ctx, authCookie, cfg)
  364. } else {
  365. r1 = ret.Error(1)
  366. }
  367. return r0, r1
  368. }
  369. // mockAuthService_RegisterChatSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterChatSession'
  370. type mockAuthService_RegisterChatSession_Call struct {
  371. *mock.Call
  372. }
  373. // RegisterChatSession is a helper method to define mock.On call
  374. // - ctx context.Context
  375. // - authCookie state.ServerCookie
  376. // - cfg func(sess *state.Session)
  377. func (_e *mockAuthService_Expecter) RegisterChatSession(ctx interface{}, authCookie interface{}, cfg interface{}) *mockAuthService_RegisterChatSession_Call {
  378. return &mockAuthService_RegisterChatSession_Call{Call: _e.mock.On("RegisterChatSession", ctx, authCookie, cfg)}
  379. }
  380. func (_c *mockAuthService_RegisterChatSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session))) *mockAuthService_RegisterChatSession_Call {
  381. _c.Call.Run(func(args mock.Arguments) {
  382. var arg0 context.Context
  383. if args[0] != nil {
  384. arg0 = args[0].(context.Context)
  385. }
  386. var arg1 state.ServerCookie
  387. if args[1] != nil {
  388. arg1 = args[1].(state.ServerCookie)
  389. }
  390. var arg2 func(sess *state.Session)
  391. if args[2] != nil {
  392. arg2 = args[2].(func(sess *state.Session))
  393. }
  394. run(
  395. arg0,
  396. arg1,
  397. arg2,
  398. )
  399. })
  400. return _c
  401. }
  402. func (_c *mockAuthService_RegisterChatSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RegisterChatSession_Call {
  403. _c.Call.Return(sessionInstance, err)
  404. return _c
  405. }
  406. func (_c *mockAuthService_RegisterChatSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(sess *state.Session)) (*state.SessionInstance, error)) *mockAuthService_RegisterChatSession_Call {
  407. _c.Call.Return(run)
  408. return _c
  409. }
  410. // RetrieveBOSSession provides a mock function for the type mockAuthService
  411. func (_mock *mockAuthService) RetrieveBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.SessionInstance, error) {
  412. ret := _mock.Called(ctx, authCookie)
  413. if len(ret) == 0 {
  414. panic("no return value specified for RetrieveBOSSession")
  415. }
  416. var r0 *state.SessionInstance
  417. var r1 error
  418. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.SessionInstance, error)); ok {
  419. return returnFunc(ctx, authCookie)
  420. }
  421. if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.SessionInstance); ok {
  422. r0 = returnFunc(ctx, authCookie)
  423. } else {
  424. if ret.Get(0) != nil {
  425. r0 = ret.Get(0).(*state.SessionInstance)
  426. }
  427. }
  428. if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
  429. r1 = returnFunc(ctx, authCookie)
  430. } else {
  431. r1 = ret.Error(1)
  432. }
  433. return r0, r1
  434. }
  435. // mockAuthService_RetrieveBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveBOSSession'
  436. type mockAuthService_RetrieveBOSSession_Call struct {
  437. *mock.Call
  438. }
  439. // RetrieveBOSSession is a helper method to define mock.On call
  440. // - ctx context.Context
  441. // - authCookie state.ServerCookie
  442. func (_e *mockAuthService_Expecter) RetrieveBOSSession(ctx interface{}, authCookie interface{}) *mockAuthService_RetrieveBOSSession_Call {
  443. return &mockAuthService_RetrieveBOSSession_Call{Call: _e.mock.On("RetrieveBOSSession", ctx, authCookie)}
  444. }
  445. func (_c *mockAuthService_RetrieveBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie)) *mockAuthService_RetrieveBOSSession_Call {
  446. _c.Call.Run(func(args mock.Arguments) {
  447. var arg0 context.Context
  448. if args[0] != nil {
  449. arg0 = args[0].(context.Context)
  450. }
  451. var arg1 state.ServerCookie
  452. if args[1] != nil {
  453. arg1 = args[1].(state.ServerCookie)
  454. }
  455. run(
  456. arg0,
  457. arg1,
  458. )
  459. })
  460. return _c
  461. }
  462. func (_c *mockAuthService_RetrieveBOSSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RetrieveBOSSession_Call {
  463. _c.Call.Return(sessionInstance, err)
  464. return _c
  465. }
  466. func (_c *mockAuthService_RetrieveBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie) (*state.SessionInstance, error)) *mockAuthService_RetrieveBOSSession_Call {
  467. _c.Call.Return(run)
  468. return _c
  469. }
  470. // Signout provides a mock function for the type mockAuthService
  471. func (_mock *mockAuthService) Signout(ctx context.Context, session *state.Session) {
  472. _mock.Called(ctx, session)
  473. return
  474. }
  475. // mockAuthService_Signout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Signout'
  476. type mockAuthService_Signout_Call struct {
  477. *mock.Call
  478. }
  479. // Signout is a helper method to define mock.On call
  480. // - ctx context.Context
  481. // - session *state.Session
  482. func (_e *mockAuthService_Expecter) Signout(ctx interface{}, session interface{}) *mockAuthService_Signout_Call {
  483. return &mockAuthService_Signout_Call{Call: _e.mock.On("Signout", ctx, session)}
  484. }
  485. func (_c *mockAuthService_Signout_Call) Run(run func(ctx context.Context, session *state.Session)) *mockAuthService_Signout_Call {
  486. _c.Call.Run(func(args mock.Arguments) {
  487. var arg0 context.Context
  488. if args[0] != nil {
  489. arg0 = args[0].(context.Context)
  490. }
  491. var arg1 *state.Session
  492. if args[1] != nil {
  493. arg1 = args[1].(*state.Session)
  494. }
  495. run(
  496. arg0,
  497. arg1,
  498. )
  499. })
  500. return _c
  501. }
  502. func (_c *mockAuthService_Signout_Call) Return() *mockAuthService_Signout_Call {
  503. _c.Call.Return()
  504. return _c
  505. }
  506. func (_c *mockAuthService_Signout_Call) RunAndReturn(run func(ctx context.Context, session *state.Session)) *mockAuthService_Signout_Call {
  507. _c.Run(run)
  508. return _c
  509. }
  510. // SignoutChat provides a mock function for the type mockAuthService
  511. func (_mock *mockAuthService) SignoutChat(ctx context.Context, sess *state.Session) {
  512. _mock.Called(ctx, sess)
  513. return
  514. }
  515. // mockAuthService_SignoutChat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignoutChat'
  516. type mockAuthService_SignoutChat_Call struct {
  517. *mock.Call
  518. }
  519. // SignoutChat is a helper method to define mock.On call
  520. // - ctx context.Context
  521. // - sess *state.Session
  522. func (_e *mockAuthService_Expecter) SignoutChat(ctx interface{}, sess interface{}) *mockAuthService_SignoutChat_Call {
  523. return &mockAuthService_SignoutChat_Call{Call: _e.mock.On("SignoutChat", ctx, sess)}
  524. }
  525. func (_c *mockAuthService_SignoutChat_Call) Run(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
  526. _c.Call.Run(func(args mock.Arguments) {
  527. var arg0 context.Context
  528. if args[0] != nil {
  529. arg0 = args[0].(context.Context)
  530. }
  531. var arg1 *state.Session
  532. if args[1] != nil {
  533. arg1 = args[1].(*state.Session)
  534. }
  535. run(
  536. arg0,
  537. arg1,
  538. )
  539. })
  540. return _c
  541. }
  542. func (_c *mockAuthService_SignoutChat_Call) Return() *mockAuthService_SignoutChat_Call {
  543. _c.Call.Return()
  544. return _c
  545. }
  546. func (_c *mockAuthService_SignoutChat_Call) RunAndReturn(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
  547. _c.Run(run)
  548. return _c
  549. }