mock_auth_service_test.go 22 KB

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