|
|
@@ -1,17 +1,31 @@
|
|
|
-// Code generated by mockery v2.53.3. DO NOT EDIT.
|
|
|
+// Code generated by mockery; DO NOT EDIT.
|
|
|
+// github.com/vektra/mockery
|
|
|
+// template: testify
|
|
|
|
|
|
package oscar
|
|
|
|
|
|
import (
|
|
|
- context "context"
|
|
|
+ "context"
|
|
|
|
|
|
- state "github.com/mk6i/retro-aim-server/state"
|
|
|
+ "github.com/google/uuid"
|
|
|
+ "github.com/mk6i/retro-aim-server/state"
|
|
|
+ "github.com/mk6i/retro-aim-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)
|
|
|
|
|
|
- uuid "github.com/google/uuid"
|
|
|
+ t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
|
|
- wire "github.com/mk6i/retro-aim-server/wire"
|
|
|
-)
|
|
|
+ return mock
|
|
|
+}
|
|
|
|
|
|
// mockAuthService is an autogenerated mock type for the AuthService type
|
|
|
type mockAuthService struct {
|
|
|
@@ -26,9 +40,9 @@ func (_m *mockAuthService) EXPECT() *mockAuthService_Expecter {
|
|
|
return &mockAuthService_Expecter{mock: &_m.Mock}
|
|
|
}
|
|
|
|
|
|
-// BUCPChallenge provides a mock function with given fields: ctx, bodyIn, newUUID
|
|
|
-func (_m *mockAuthService) BUCPChallenge(ctx context.Context, bodyIn wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error) {
|
|
|
- ret := _m.Called(ctx, bodyIn, newUUID)
|
|
|
+// BUCPChallenge provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) BUCPChallenge(ctx context.Context, bodyIn wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error) {
|
|
|
+ ret := _mock.Called(ctx, bodyIn, newUUID)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for BUCPChallenge")
|
|
|
@@ -36,21 +50,19 @@ func (_m *mockAuthService) BUCPChallenge(ctx context.Context, bodyIn wire.SNAC_0
|
|
|
|
|
|
var r0 wire.SNACMessage
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) (wire.SNACMessage, error)); ok {
|
|
|
- return rf(ctx, bodyIn, newUUID)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) (wire.SNACMessage, error)); ok {
|
|
|
+ return returnFunc(ctx, bodyIn, newUUID)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) wire.SNACMessage); ok {
|
|
|
- r0 = rf(ctx, bodyIn, newUUID)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) wire.SNACMessage); ok {
|
|
|
+ r0 = returnFunc(ctx, bodyIn, newUUID)
|
|
|
} else {
|
|
|
r0 = ret.Get(0).(wire.SNACMessage)
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) error); ok {
|
|
|
- r1 = rf(ctx, bodyIn, newUUID)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) error); ok {
|
|
|
+ r1 = returnFunc(ctx, bodyIn, newUUID)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -69,24 +81,40 @@ func (_e *mockAuthService_Expecter) BUCPChallenge(ctx interface{}, bodyIn interf
|
|
|
|
|
|
func (_c *mockAuthService_BUCPChallenge_Call) Run(run func(ctx context.Context, bodyIn wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID)) *mockAuthService_BUCPChallenge_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(wire.SNAC_0x17_0x06_BUCPChallengeRequest), args[2].(func() uuid.UUID))
|
|
|
+ var arg0 context.Context
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].(context.Context)
|
|
|
+ }
|
|
|
+ var arg1 wire.SNAC_0x17_0x06_BUCPChallengeRequest
|
|
|
+ if args[1] != nil {
|
|
|
+ arg1 = args[1].(wire.SNAC_0x17_0x06_BUCPChallengeRequest)
|
|
|
+ }
|
|
|
+ var arg2 func() uuid.UUID
|
|
|
+ if args[2] != nil {
|
|
|
+ arg2 = args[2].(func() uuid.UUID)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ arg2,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_BUCPChallenge_Call) Return(_a0 wire.SNACMessage, _a1 error) *mockAuthService_BUCPChallenge_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_BUCPChallenge_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPChallenge_Call {
|
|
|
+ _c.Call.Return(sNACMessage, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_BUCPChallenge_Call) RunAndReturn(run func(context.Context, wire.SNAC_0x17_0x06_BUCPChallengeRequest, func() uuid.UUID) (wire.SNACMessage, error)) *mockAuthService_BUCPChallenge_Call {
|
|
|
+func (_c *mockAuthService_BUCPChallenge_Call) RunAndReturn(run func(ctx context.Context, bodyIn wire.SNAC_0x17_0x06_BUCPChallengeRequest, newUUID func() uuid.UUID) (wire.SNACMessage, error)) *mockAuthService_BUCPChallenge_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// BUCPLogin provides a mock function with given fields: ctx, bodyIn, newUserFn, here
|
|
|
-func (_m *mockAuthService) BUCPLogin(ctx context.Context, bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest, newUserFn func(state.DisplayScreenName) (state.User, error), here string) (wire.SNACMessage, error) {
|
|
|
- ret := _m.Called(ctx, bodyIn, newUserFn, here)
|
|
|
+// BUCPLogin provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) BUCPLogin(ctx context.Context, bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string) (wire.SNACMessage, error) {
|
|
|
+ ret := _mock.Called(ctx, bodyIn, newUserFn, here)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for BUCPLogin")
|
|
|
@@ -94,21 +122,19 @@ func (_m *mockAuthService) BUCPLogin(ctx context.Context, bodyIn wire.SNAC_0x17_
|
|
|
|
|
|
var r0 wire.SNACMessage
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, func(state.DisplayScreenName) (state.User, error), string) (wire.SNACMessage, error)); ok {
|
|
|
- return rf(ctx, bodyIn, newUserFn, here)
|
|
|
+ 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 {
|
|
|
+ return returnFunc(ctx, bodyIn, newUserFn, here)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, func(state.DisplayScreenName) (state.User, error), string) wire.SNACMessage); ok {
|
|
|
- r0 = rf(ctx, bodyIn, newUserFn, here)
|
|
|
+ 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 {
|
|
|
+ r0 = returnFunc(ctx, bodyIn, newUserFn, here)
|
|
|
} else {
|
|
|
r0 = ret.Get(0).(wire.SNACMessage)
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, func(state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
- r1 = rf(ctx, bodyIn, newUserFn, here)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, func(screenName state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
+ r1 = returnFunc(ctx, bodyIn, newUserFn, here)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -120,32 +146,53 @@ type mockAuthService_BUCPLogin_Call struct {
|
|
|
// BUCPLogin is a helper method to define mock.On call
|
|
|
// - ctx context.Context
|
|
|
// - bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest
|
|
|
-// - newUserFn func(state.DisplayScreenName)(state.User , error)
|
|
|
+// - newUserFn func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
// - here string
|
|
|
func (_e *mockAuthService_Expecter) BUCPLogin(ctx interface{}, bodyIn interface{}, newUserFn interface{}, here interface{}) *mockAuthService_BUCPLogin_Call {
|
|
|
return &mockAuthService_BUCPLogin_Call{Call: _e.mock.On("BUCPLogin", ctx, bodyIn, newUserFn, here)}
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_BUCPLogin_Call) Run(run func(ctx context.Context, bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest, newUserFn func(state.DisplayScreenName) (state.User, error), here string)) *mockAuthService_BUCPLogin_Call {
|
|
|
+func (_c *mockAuthService_BUCPLogin_Call) Run(run func(ctx context.Context, bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string)) *mockAuthService_BUCPLogin_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(wire.SNAC_0x17_0x02_BUCPLoginRequest), args[2].(func(state.DisplayScreenName) (state.User, error)), args[3].(string))
|
|
|
+ var arg0 context.Context
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].(context.Context)
|
|
|
+ }
|
|
|
+ var arg1 wire.SNAC_0x17_0x02_BUCPLoginRequest
|
|
|
+ if args[1] != nil {
|
|
|
+ arg1 = args[1].(wire.SNAC_0x17_0x02_BUCPLoginRequest)
|
|
|
+ }
|
|
|
+ var arg2 func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
+ if args[2] != nil {
|
|
|
+ arg2 = args[2].(func(screenName state.DisplayScreenName) (state.User, error))
|
|
|
+ }
|
|
|
+ var arg3 string
|
|
|
+ if args[3] != nil {
|
|
|
+ arg3 = args[3].(string)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ arg2,
|
|
|
+ arg3,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_BUCPLogin_Call) Return(_a0 wire.SNACMessage, _a1 error) *mockAuthService_BUCPLogin_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_BUCPLogin_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_BUCPLogin_Call {
|
|
|
+ _c.Call.Return(sNACMessage, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_BUCPLogin_Call) RunAndReturn(run func(context.Context, wire.SNAC_0x17_0x02_BUCPLoginRequest, func(state.DisplayScreenName) (state.User, error), string) (wire.SNACMessage, error)) *mockAuthService_BUCPLogin_Call {
|
|
|
+func (_c *mockAuthService_BUCPLogin_Call) RunAndReturn(run func(ctx context.Context, bodyIn wire.SNAC_0x17_0x02_BUCPLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string) (wire.SNACMessage, error)) *mockAuthService_BUCPLogin_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// CrackCookie provides a mock function with given fields: authCookie
|
|
|
-func (_m *mockAuthService) CrackCookie(authCookie []byte) (state.ServerCookie, error) {
|
|
|
- ret := _m.Called(authCookie)
|
|
|
+// 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")
|
|
|
@@ -153,21 +200,19 @@ func (_m *mockAuthService) CrackCookie(authCookie []byte) (state.ServerCookie, e
|
|
|
|
|
|
var r0 state.ServerCookie
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func([]byte) (state.ServerCookie, error)); ok {
|
|
|
- return rf(authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func([]byte) (state.ServerCookie, error)); ok {
|
|
|
+ return returnFunc(authCookie)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func([]byte) state.ServerCookie); ok {
|
|
|
- r0 = rf(authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func([]byte) state.ServerCookie); ok {
|
|
|
+ r0 = returnFunc(authCookie)
|
|
|
} else {
|
|
|
r0 = ret.Get(0).(state.ServerCookie)
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func([]byte) error); ok {
|
|
|
- r1 = rf(authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
|
|
|
+ r1 = returnFunc(authCookie)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -184,24 +229,30 @@ func (_e *mockAuthService_Expecter) CrackCookie(authCookie interface{}) *mockAut
|
|
|
|
|
|
func (_c *mockAuthService_CrackCookie_Call) Run(run func(authCookie []byte)) *mockAuthService_CrackCookie_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].([]byte))
|
|
|
+ var arg0 []byte
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].([]byte)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_CrackCookie_Call) Return(_a0 state.ServerCookie, _a1 error) *mockAuthService_CrackCookie_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+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([]byte) (state.ServerCookie, error)) *mockAuthService_CrackCookie_Call {
|
|
|
+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 with given fields: ctx, frame, newUserFn, here
|
|
|
-func (_m *mockAuthService) FLAPLogin(ctx context.Context, frame wire.FLAPSignonFrame, newUserFn func(state.DisplayScreenName) (state.User, error), here string) (wire.TLVRestBlock, error) {
|
|
|
- ret := _m.Called(ctx, frame, newUserFn, here)
|
|
|
+// FLAPLogin provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) FLAPLogin(ctx context.Context, frame wire.FLAPSignonFrame, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string) (wire.TLVRestBlock, error) {
|
|
|
+ ret := _mock.Called(ctx, frame, newUserFn, here)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for FLAPLogin")
|
|
|
@@ -209,21 +260,19 @@ func (_m *mockAuthService) FLAPLogin(ctx context.Context, frame wire.FLAPSignonF
|
|
|
|
|
|
var r0 wire.TLVRestBlock
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, func(state.DisplayScreenName) (state.User, error), string) (wire.TLVRestBlock, error)); ok {
|
|
|
- return rf(ctx, frame, newUserFn, here)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, func(screenName state.DisplayScreenName) (state.User, error), string) (wire.TLVRestBlock, error)); ok {
|
|
|
+ return returnFunc(ctx, frame, newUserFn, here)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, func(state.DisplayScreenName) (state.User, error), string) wire.TLVRestBlock); ok {
|
|
|
- r0 = rf(ctx, frame, newUserFn, here)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.FLAPSignonFrame, func(screenName state.DisplayScreenName) (state.User, error), string) wire.TLVRestBlock); ok {
|
|
|
+ r0 = returnFunc(ctx, frame, newUserFn, here)
|
|
|
} else {
|
|
|
r0 = ret.Get(0).(wire.TLVRestBlock)
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, wire.FLAPSignonFrame, func(state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
- r1 = rf(ctx, frame, newUserFn, here)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, wire.FLAPSignonFrame, func(screenName state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
+ r1 = returnFunc(ctx, frame, newUserFn, here)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -235,32 +284,53 @@ type mockAuthService_FLAPLogin_Call struct {
|
|
|
// FLAPLogin is a helper method to define mock.On call
|
|
|
// - ctx context.Context
|
|
|
// - frame wire.FLAPSignonFrame
|
|
|
-// - newUserFn func(state.DisplayScreenName)(state.User , error)
|
|
|
+// - newUserFn func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
// - here string
|
|
|
func (_e *mockAuthService_Expecter) FLAPLogin(ctx interface{}, frame interface{}, newUserFn interface{}, here interface{}) *mockAuthService_FLAPLogin_Call {
|
|
|
return &mockAuthService_FLAPLogin_Call{Call: _e.mock.On("FLAPLogin", ctx, frame, newUserFn, here)}
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_FLAPLogin_Call) Run(run func(ctx context.Context, frame wire.FLAPSignonFrame, newUserFn func(state.DisplayScreenName) (state.User, error), here string)) *mockAuthService_FLAPLogin_Call {
|
|
|
+func (_c *mockAuthService_FLAPLogin_Call) Run(run func(ctx context.Context, frame wire.FLAPSignonFrame, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string)) *mockAuthService_FLAPLogin_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(wire.FLAPSignonFrame), args[2].(func(state.DisplayScreenName) (state.User, error)), args[3].(string))
|
|
|
+ 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 func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
+ if args[2] != nil {
|
|
|
+ arg2 = args[2].(func(screenName state.DisplayScreenName) (state.User, error))
|
|
|
+ }
|
|
|
+ var arg3 string
|
|
|
+ if args[3] != nil {
|
|
|
+ arg3 = args[3].(string)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ arg2,
|
|
|
+ arg3,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_FLAPLogin_Call) Return(_a0 wire.TLVRestBlock, _a1 error) *mockAuthService_FLAPLogin_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+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(context.Context, wire.FLAPSignonFrame, func(state.DisplayScreenName) (state.User, error), string) (wire.TLVRestBlock, error)) *mockAuthService_FLAPLogin_Call {
|
|
|
+func (_c *mockAuthService_FLAPLogin_Call) RunAndReturn(run func(ctx context.Context, frame wire.FLAPSignonFrame, newUserFn func(screenName state.DisplayScreenName) (state.User, error), here string) (wire.TLVRestBlock, error)) *mockAuthService_FLAPLogin_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// KerberosLogin provides a mock function with given fields: ctx, inBody, newUserFn, advertisedHost
|
|
|
-func (_m *mockAuthService) KerberosLogin(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, newUserFn func(state.DisplayScreenName) (state.User, error), advertisedHost string) (wire.SNACMessage, error) {
|
|
|
- ret := _m.Called(ctx, inBody, newUserFn, advertisedHost)
|
|
|
+// KerberosLogin provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) KerberosLogin(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), advertisedHost string) (wire.SNACMessage, error) {
|
|
|
+ ret := _mock.Called(ctx, inBody, newUserFn, advertisedHost)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for KerberosLogin")
|
|
|
@@ -268,21 +338,19 @@ func (_m *mockAuthService) KerberosLogin(ctx context.Context, inBody wire.SNAC_0
|
|
|
|
|
|
var r0 wire.SNACMessage
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(state.DisplayScreenName) (state.User, error), string) (wire.SNACMessage, error)); ok {
|
|
|
- return rf(ctx, inBody, newUserFn, advertisedHost)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(screenName state.DisplayScreenName) (state.User, error), string) (wire.SNACMessage, error)); ok {
|
|
|
+ return returnFunc(ctx, inBody, newUserFn, advertisedHost)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(state.DisplayScreenName) (state.User, error), string) wire.SNACMessage); ok {
|
|
|
- r0 = rf(ctx, inBody, newUserFn, advertisedHost)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(screenName state.DisplayScreenName) (state.User, error), string) wire.SNACMessage); ok {
|
|
|
+ r0 = returnFunc(ctx, inBody, newUserFn, advertisedHost)
|
|
|
} else {
|
|
|
r0 = ret.Get(0).(wire.SNACMessage)
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
- r1 = rf(ctx, inBody, newUserFn, advertisedHost)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(screenName state.DisplayScreenName) (state.User, error), string) error); ok {
|
|
|
+ r1 = returnFunc(ctx, inBody, newUserFn, advertisedHost)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -294,32 +362,53 @@ type mockAuthService_KerberosLogin_Call struct {
|
|
|
// KerberosLogin is a helper method to define mock.On call
|
|
|
// - ctx context.Context
|
|
|
// - inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest
|
|
|
-// - newUserFn func(state.DisplayScreenName)(state.User , error)
|
|
|
+// - newUserFn func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
// - advertisedHost string
|
|
|
func (_e *mockAuthService_Expecter) KerberosLogin(ctx interface{}, inBody interface{}, newUserFn interface{}, advertisedHost interface{}) *mockAuthService_KerberosLogin_Call {
|
|
|
return &mockAuthService_KerberosLogin_Call{Call: _e.mock.On("KerberosLogin", ctx, inBody, newUserFn, advertisedHost)}
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_KerberosLogin_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, newUserFn func(state.DisplayScreenName) (state.User, error), advertisedHost string)) *mockAuthService_KerberosLogin_Call {
|
|
|
+func (_c *mockAuthService_KerberosLogin_Call) Run(run func(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), advertisedHost string)) *mockAuthService_KerberosLogin_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(wire.SNAC_0x050C_0x0002_KerberosLoginRequest), args[2].(func(state.DisplayScreenName) (state.User, error)), args[3].(string))
|
|
|
+ var arg0 context.Context
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].(context.Context)
|
|
|
+ }
|
|
|
+ var arg1 wire.SNAC_0x050C_0x0002_KerberosLoginRequest
|
|
|
+ if args[1] != nil {
|
|
|
+ arg1 = args[1].(wire.SNAC_0x050C_0x0002_KerberosLoginRequest)
|
|
|
+ }
|
|
|
+ var arg2 func(screenName state.DisplayScreenName) (state.User, error)
|
|
|
+ if args[2] != nil {
|
|
|
+ arg2 = args[2].(func(screenName state.DisplayScreenName) (state.User, error))
|
|
|
+ }
|
|
|
+ var arg3 string
|
|
|
+ if args[3] != nil {
|
|
|
+ arg3 = args[3].(string)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ arg2,
|
|
|
+ arg3,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_KerberosLogin_Call) Return(_a0 wire.SNACMessage, _a1 error) *mockAuthService_KerberosLogin_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_KerberosLogin_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAuthService_KerberosLogin_Call {
|
|
|
+ _c.Call.Return(sNACMessage, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_KerberosLogin_Call) RunAndReturn(run func(context.Context, wire.SNAC_0x050C_0x0002_KerberosLoginRequest, func(state.DisplayScreenName) (state.User, error), string) (wire.SNACMessage, error)) *mockAuthService_KerberosLogin_Call {
|
|
|
+func (_c *mockAuthService_KerberosLogin_Call) RunAndReturn(run func(ctx context.Context, inBody wire.SNAC_0x050C_0x0002_KerberosLoginRequest, newUserFn func(screenName state.DisplayScreenName) (state.User, error), advertisedHost string) (wire.SNACMessage, error)) *mockAuthService_KerberosLogin_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// RegisterBOSSession provides a mock function with given fields: ctx, authCookie
|
|
|
-func (_m *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
- ret := _m.Called(ctx, authCookie)
|
|
|
+// RegisterBOSSession provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
+ ret := _mock.Called(ctx, authCookie)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for RegisterBOSSession")
|
|
|
@@ -327,23 +416,21 @@ func (_m *mockAuthService) RegisterBOSSession(ctx context.Context, authCookie st
|
|
|
|
|
|
var r0 *state.Session
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
- return rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
+ return returnFunc(ctx, authCookie)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
- r0 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
+ r0 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
if ret.Get(0) != nil {
|
|
|
r0 = ret.Get(0).(*state.Session)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
- r1 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
+ r1 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -361,24 +448,35 @@ func (_e *mockAuthService_Expecter) RegisterBOSSession(ctx interface{}, authCook
|
|
|
|
|
|
func (_c *mockAuthService_RegisterBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie)) *mockAuthService_RegisterBOSSession_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(state.ServerCookie))
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RegisterBOSSession_Call) Return(_a0 *state.Session, _a1 error) *mockAuthService_RegisterBOSSession_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_RegisterBOSSession_Call) Return(session *state.Session, err error) *mockAuthService_RegisterBOSSession_Call {
|
|
|
+ _c.Call.Return(session, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RegisterBOSSession_Call) RunAndReturn(run func(context.Context, state.ServerCookie) (*state.Session, error)) *mockAuthService_RegisterBOSSession_Call {
|
|
|
+func (_c *mockAuthService_RegisterBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error)) *mockAuthService_RegisterBOSSession_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// RegisterChatSession provides a mock function with given fields: ctx, authCookie
|
|
|
-func (_m *mockAuthService) RegisterChatSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
- ret := _m.Called(ctx, authCookie)
|
|
|
+// RegisterChatSession provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) RegisterChatSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
+ ret := _mock.Called(ctx, authCookie)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for RegisterChatSession")
|
|
|
@@ -386,23 +484,21 @@ func (_m *mockAuthService) RegisterChatSession(ctx context.Context, authCookie s
|
|
|
|
|
|
var r0 *state.Session
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
- return rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
+ return returnFunc(ctx, authCookie)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
- r0 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
+ r0 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
if ret.Get(0) != nil {
|
|
|
r0 = ret.Get(0).(*state.Session)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
- r1 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
+ r1 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -420,24 +516,35 @@ func (_e *mockAuthService_Expecter) RegisterChatSession(ctx interface{}, authCoo
|
|
|
|
|
|
func (_c *mockAuthService_RegisterChatSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie)) *mockAuthService_RegisterChatSession_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(state.ServerCookie))
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RegisterChatSession_Call) Return(_a0 *state.Session, _a1 error) *mockAuthService_RegisterChatSession_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_RegisterChatSession_Call) Return(session *state.Session, err error) *mockAuthService_RegisterChatSession_Call {
|
|
|
+ _c.Call.Return(session, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RegisterChatSession_Call) RunAndReturn(run func(context.Context, state.ServerCookie) (*state.Session, error)) *mockAuthService_RegisterChatSession_Call {
|
|
|
+func (_c *mockAuthService_RegisterChatSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error)) *mockAuthService_RegisterChatSession_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// RetrieveBOSSession provides a mock function with given fields: ctx, authCookie
|
|
|
-func (_m *mockAuthService) RetrieveBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
- ret := _m.Called(ctx, authCookie)
|
|
|
+// RetrieveBOSSession provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) RetrieveBOSSession(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error) {
|
|
|
+ ret := _mock.Called(ctx, authCookie)
|
|
|
|
|
|
if len(ret) == 0 {
|
|
|
panic("no return value specified for RetrieveBOSSession")
|
|
|
@@ -445,23 +552,21 @@ func (_m *mockAuthService) RetrieveBOSSession(ctx context.Context, authCookie st
|
|
|
|
|
|
var r0 *state.Session
|
|
|
var r1 error
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
- return rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) (*state.Session, error)); ok {
|
|
|
+ return returnFunc(ctx, authCookie)
|
|
|
}
|
|
|
- if rf, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
- r0 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(0).(func(context.Context, state.ServerCookie) *state.Session); ok {
|
|
|
+ r0 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
if ret.Get(0) != nil {
|
|
|
r0 = ret.Get(0).(*state.Session)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if rf, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
- r1 = rf(ctx, authCookie)
|
|
|
+ if returnFunc, ok := ret.Get(1).(func(context.Context, state.ServerCookie) error); ok {
|
|
|
+ r1 = returnFunc(ctx, authCookie)
|
|
|
} else {
|
|
|
r1 = ret.Error(1)
|
|
|
}
|
|
|
-
|
|
|
return r0, r1
|
|
|
}
|
|
|
|
|
|
@@ -479,24 +584,36 @@ func (_e *mockAuthService_Expecter) RetrieveBOSSession(ctx interface{}, authCook
|
|
|
|
|
|
func (_c *mockAuthService_RetrieveBOSSession_Call) Run(run func(ctx context.Context, authCookie state.ServerCookie)) *mockAuthService_RetrieveBOSSession_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(state.ServerCookie))
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RetrieveBOSSession_Call) Return(_a0 *state.Session, _a1 error) *mockAuthService_RetrieveBOSSession_Call {
|
|
|
- _c.Call.Return(_a0, _a1)
|
|
|
+func (_c *mockAuthService_RetrieveBOSSession_Call) Return(session *state.Session, err error) *mockAuthService_RetrieveBOSSession_Call {
|
|
|
+ _c.Call.Return(session, err)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_RetrieveBOSSession_Call) RunAndReturn(run func(context.Context, state.ServerCookie) (*state.Session, error)) *mockAuthService_RetrieveBOSSession_Call {
|
|
|
+func (_c *mockAuthService_RetrieveBOSSession_Call) RunAndReturn(run func(ctx context.Context, authCookie state.ServerCookie) (*state.Session, error)) *mockAuthService_RetrieveBOSSession_Call {
|
|
|
_c.Call.Return(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// Signout provides a mock function with given fields: ctx, sess
|
|
|
-func (_m *mockAuthService) Signout(ctx context.Context, sess *state.Session) {
|
|
|
- _m.Called(ctx, sess)
|
|
|
+// Signout provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) Signout(ctx context.Context, sess *state.Session) {
|
|
|
+ _mock.Called(ctx, sess)
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
// mockAuthService_Signout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Signout'
|
|
|
@@ -513,7 +630,18 @@ func (_e *mockAuthService_Expecter) Signout(ctx interface{}, sess interface{}) *
|
|
|
|
|
|
func (_c *mockAuthService_Signout_Call) Run(run func(ctx context.Context, sess *state.Session)) *mockAuthService_Signout_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(*state.Session))
|
|
|
+ var arg0 context.Context
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].(context.Context)
|
|
|
+ }
|
|
|
+ var arg1 *state.Session
|
|
|
+ if args[1] != nil {
|
|
|
+ arg1 = args[1].(*state.Session)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
@@ -523,14 +651,15 @@ func (_c *mockAuthService_Signout_Call) Return() *mockAuthService_Signout_Call {
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_Signout_Call) RunAndReturn(run func(context.Context, *state.Session)) *mockAuthService_Signout_Call {
|
|
|
+func (_c *mockAuthService_Signout_Call) RunAndReturn(run func(ctx context.Context, sess *state.Session)) *mockAuthService_Signout_Call {
|
|
|
_c.Run(run)
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-// SignoutChat provides a mock function with given fields: ctx, sess
|
|
|
-func (_m *mockAuthService) SignoutChat(ctx context.Context, sess *state.Session) {
|
|
|
- _m.Called(ctx, sess)
|
|
|
+// SignoutChat provides a mock function for the type mockAuthService
|
|
|
+func (_mock *mockAuthService) SignoutChat(ctx context.Context, sess *state.Session) {
|
|
|
+ _mock.Called(ctx, sess)
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
// mockAuthService_SignoutChat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignoutChat'
|
|
|
@@ -547,7 +676,18 @@ func (_e *mockAuthService_Expecter) SignoutChat(ctx interface{}, sess interface{
|
|
|
|
|
|
func (_c *mockAuthService_SignoutChat_Call) Run(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
|
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
|
- run(args[0].(context.Context), args[1].(*state.Session))
|
|
|
+ var arg0 context.Context
|
|
|
+ if args[0] != nil {
|
|
|
+ arg0 = args[0].(context.Context)
|
|
|
+ }
|
|
|
+ var arg1 *state.Session
|
|
|
+ if args[1] != nil {
|
|
|
+ arg1 = args[1].(*state.Session)
|
|
|
+ }
|
|
|
+ run(
|
|
|
+ arg0,
|
|
|
+ arg1,
|
|
|
+ )
|
|
|
})
|
|
|
return _c
|
|
|
}
|
|
|
@@ -557,21 +697,7 @@ func (_c *mockAuthService_SignoutChat_Call) Return() *mockAuthService_SignoutCha
|
|
|
return _c
|
|
|
}
|
|
|
|
|
|
-func (_c *mockAuthService_SignoutChat_Call) RunAndReturn(run func(context.Context, *state.Session)) *mockAuthService_SignoutChat_Call {
|
|
|
+func (_c *mockAuthService_SignoutChat_Call) RunAndReturn(run func(ctx context.Context, sess *state.Session)) *mockAuthService_SignoutChat_Call {
|
|
|
_c.Run(run)
|
|
|
return _c
|
|
|
}
|
|
|
-
|
|
|
-// 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
|
|
|
-}
|