| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- // Code generated by mockery; DO NOT EDIT.
- // github.com/vektra/mockery
- // template: testify
- package icq_legacy
- import (
- "context"
- "github.com/mk6i/open-oscar-server/state"
- "github.com/mk6i/open-oscar-server/wire"
- mock "github.com/stretchr/testify/mock"
- )
- // 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.
- // The first argument is typically a *testing.T value.
- func newMockAuthService(t interface {
- mock.TestingT
- Cleanup(func())
- }) *mockAuthService {
- mock := &mockAuthService{}
- mock.Mock.Test(t)
- t.Cleanup(func() { mock.AssertExpectations(t) })
- return mock
- }
- // mockAuthService is an autogenerated mock type for the AuthService type
- type mockAuthService struct {
- mock.Mock
- }
- type mockAuthService_Expecter struct {
- mock *mock.Mock
- }
- func (_m *mockAuthService) EXPECT() *mockAuthService_Expecter {
- return &mockAuthService_Expecter{mock: &_m.Mock}
- }
- // CrackCookie provides a mock function for the type mockAuthService
- func (_mock *mockAuthService) CrackCookie(authCookie []byte) (state.ServerCookie, error) {
- ret := _mock.Called(authCookie)
- if len(ret) == 0 {
- panic("no return value specified for CrackCookie")
- }
- var r0 state.ServerCookie
- var r1 error
- if returnFunc, ok := ret.Get(0).(func([]byte) (state.ServerCookie, error)); ok {
- return returnFunc(authCookie)
- }
- if returnFunc, ok := ret.Get(0).(func([]byte) state.ServerCookie); ok {
- r0 = returnFunc(authCookie)
- } else {
- r0 = ret.Get(0).(state.ServerCookie)
- }
- if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
- r1 = returnFunc(authCookie)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAuthService_CrackCookie_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CrackCookie'
- type mockAuthService_CrackCookie_Call struct {
- *mock.Call
- }
- // CrackCookie is a helper method to define mock.On call
- // - authCookie []byte
- func (_e *mockAuthService_Expecter) CrackCookie(authCookie interface{}) *mockAuthService_CrackCookie_Call {
- return &mockAuthService_CrackCookie_Call{Call: _e.mock.On("CrackCookie", authCookie)}
- }
- func (_c *mockAuthService_CrackCookie_Call) Run(run func(authCookie []byte)) *mockAuthService_CrackCookie_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 []byte
- if args[0] != nil {
- arg0 = args[0].([]byte)
- }
- run(
- arg0,
- )
- })
- return _c
- }
- func (_c *mockAuthService_CrackCookie_Call) Return(serverCookie state.ServerCookie, err error) *mockAuthService_CrackCookie_Call {
- _c.Call.Return(serverCookie, err)
- return _c
- }
- func (_c *mockAuthService_CrackCookie_Call) RunAndReturn(run func(authCookie []byte) (state.ServerCookie, error)) *mockAuthService_CrackCookie_Call {
- _c.Call.Return(run)
- return _c
- }
- // FLAPLogin provides a mock function for the type mockAuthService
- func (_mock *mockAuthService) FLAPLogin(ctx context.Context, inFrame wire.FLAPSignonFrame, advertisedHost string) (wire.TLVRestBlock, error) {
- ret := _mock.Called(ctx, inFrame, advertisedHost)
- if len(ret) == 0 {
- panic("no return value specified for FLAPLogin")
- }
- var r0 wire.TLVRestBlock
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, string) (wire.TLVRestBlock, error)); ok {
- return returnFunc(ctx, inFrame, advertisedHost)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, string) wire.TLVRestBlock); ok {
- r0 = returnFunc(ctx, inFrame, advertisedHost)
- } else {
- r0 = ret.Get(0).(wire.TLVRestBlock)
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, wire.FLAPSignonFrame, string) error); ok {
- r1 = returnFunc(ctx, inFrame, advertisedHost)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAuthService_FLAPLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FLAPLogin'
- type mockAuthService_FLAPLogin_Call struct {
- *mock.Call
- }
- // FLAPLogin is a helper method to define mock.On call
- // - ctx context.Context
- // - inFrame wire.FLAPSignonFrame
- // - advertisedHost string
- func (_e *mockAuthService_Expecter) FLAPLogin(ctx interface{}, inFrame interface{}, advertisedHost interface{}) *mockAuthService_FLAPLogin_Call {
- return &mockAuthService_FLAPLogin_Call{Call: _e.mock.On("FLAPLogin", ctx, inFrame, advertisedHost)}
- }
- func (_c *mockAuthService_FLAPLogin_Call) Run(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, advertisedHost string)) *mockAuthService_FLAPLogin_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 wire.FLAPSignonFrame
- if args[1] != nil {
- arg1 = args[1].(wire.FLAPSignonFrame)
- }
- var arg2 string
- if args[2] != nil {
- arg2 = args[2].(string)
- }
- run(
- arg0,
- arg1,
- arg2,
- )
- })
- return _c
- }
- func (_c *mockAuthService_FLAPLogin_Call) Return(tLVRestBlock wire.TLVRestBlock, err error) *mockAuthService_FLAPLogin_Call {
- _c.Call.Return(tLVRestBlock, err)
- return _c
- }
- func (_c *mockAuthService_FLAPLogin_Call) RunAndReturn(run func(ctx context.Context, inFrame wire.FLAPSignonFrame, advertisedHost string) (wire.TLVRestBlock, error)) *mockAuthService_FLAPLogin_Call {
- _c.Call.Return(run)
- return _c
- }
- // RegisterBOSSession provides a mock function for the type mockAuthService
- func (_mock *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error) {
- ret := _mock.Called(ctx, authCookie, cfg)
- if len(ret) == 0 {
- panic("no return value specified for RegisterBOSSession")
- }
- var r0 *state.SessionInstance
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) (*state.SessionInstance, error)); ok {
- return returnFunc(ctx, authCookie, cfg)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie, func(*state.Session)) *state.SessionInstance); ok {
- r0 = returnFunc(ctx, authCookie, cfg)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*state.SessionInstance)
- }
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie, func(*state.Session)) error); ok {
- r1 = returnFunc(ctx, authCookie, cfg)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAuthService_RegisterBOSSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterBOSSession'
- type mockAuthService_RegisterBOSSession_Call struct {
- *mock.Call
- }
- // RegisterBOSSession is a helper method to define mock.On call
- // - ctx context.Context
- // - authCookie state.ServerCookie
- // - cfg func(*state.Session)
- func (_e *mockAuthService_Expecter) RegisterBOSSession(ctx interface{}, authCookie interface{}, cfg interface{}) *mockAuthService_RegisterBOSSession_Call {
- return &mockAuthService_RegisterBOSSession_Call{Call: _e.mock.On("RegisterBOSSession", ctx, authCookie, cfg)}
- }
- func (_c *mockAuthService_RegisterBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session))) *mockAuthService_RegisterBOSSession_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 state.ServerCookie
- if args[1] != nil {
- arg1 = args[1].(state.ServerCookie)
- }
- var arg2 func(*state.Session)
- if args[2] != nil {
- arg2 = args[2].(func(*state.Session))
- }
- run(
- arg0,
- arg1,
- arg2,
- )
- })
- return _c
- }
- func (_c *mockAuthService_RegisterBOSSession_Call) Return(sessionInstance *state.SessionInstance, err error) *mockAuthService_RegisterBOSSession_Call {
- _c.Call.Return(sessionInstance, err)
- return _c
- }
- func (_c *mockAuthService_RegisterBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie, cfg func(*state.Session)) (*state.SessionInstance, error)) *mockAuthService_RegisterBOSSession_Call {
- _c.Call.Return(run)
- return _c
- }
|