| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- // Code generated by mockery; DO NOT EDIT.
- // github.com/vektra/mockery
- // template: testify
- package oscar
- import (
- "context"
- "github.com/mk6i/open-oscar-server/state"
- "github.com/mk6i/open-oscar-server/wire"
- mock "github.com/stretchr/testify/mock"
- )
- // newMockAdminService creates a new instance of mockAdminService. 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 newMockAdminService(t interface {
- mock.TestingT
- Cleanup(func())
- }) *mockAdminService {
- mock := &mockAdminService{}
- mock.Mock.Test(t)
- t.Cleanup(func() { mock.AssertExpectations(t) })
- return mock
- }
- // mockAdminService is an autogenerated mock type for the AdminService type
- type mockAdminService struct {
- mock.Mock
- }
- type mockAdminService_Expecter struct {
- mock *mock.Mock
- }
- func (_m *mockAdminService) EXPECT() *mockAdminService_Expecter {
- return &mockAdminService_Expecter{mock: &_m.Mock}
- }
- // ConfirmRequest provides a mock function for the type mockAdminService
- func (_mock *mockAdminService) ConfirmRequest(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame) (wire.SNACMessage, error) {
- ret := _mock.Called(ctx, instance, inFrame)
- if len(ret) == 0 {
- panic("no return value specified for ConfirmRequest")
- }
- var r0 wire.SNACMessage
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame) (wire.SNACMessage, error)); ok {
- return returnFunc(ctx, instance, inFrame)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame) wire.SNACMessage); ok {
- r0 = returnFunc(ctx, instance, inFrame)
- } else {
- r0 = ret.Get(0).(wire.SNACMessage)
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame) error); ok {
- r1 = returnFunc(ctx, instance, inFrame)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAdminService_ConfirmRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfirmRequest'
- type mockAdminService_ConfirmRequest_Call struct {
- *mock.Call
- }
- // ConfirmRequest is a helper method to define mock.On call
- // - ctx context.Context
- // - instance *state.SessionInstance
- // - inFrame wire.SNACFrame
- func (_e *mockAdminService_Expecter) ConfirmRequest(ctx interface{}, instance interface{}, inFrame interface{}) *mockAdminService_ConfirmRequest_Call {
- return &mockAdminService_ConfirmRequest_Call{Call: _e.mock.On("ConfirmRequest", ctx, instance, inFrame)}
- }
- func (_c *mockAdminService_ConfirmRequest_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame)) *mockAdminService_ConfirmRequest_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 *state.SessionInstance
- if args[1] != nil {
- arg1 = args[1].(*state.SessionInstance)
- }
- var arg2 wire.SNACFrame
- if args[2] != nil {
- arg2 = args[2].(wire.SNACFrame)
- }
- run(
- arg0,
- arg1,
- arg2,
- )
- })
- return _c
- }
- func (_c *mockAdminService_ConfirmRequest_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAdminService_ConfirmRequest_Call {
- _c.Call.Return(sNACMessage, err)
- return _c
- }
- func (_c *mockAdminService_ConfirmRequest_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame) (wire.SNACMessage, error)) *mockAdminService_ConfirmRequest_Call {
- _c.Call.Return(run)
- return _c
- }
- // InfoChangeRequest provides a mock function for the type mockAdminService
- func (_mock *mockAdminService) InfoChangeRequest(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error) {
- ret := _mock.Called(ctx, instance, inFrame, inBody)
- if len(ret) == 0 {
- panic("no return value specified for InfoChangeRequest")
- }
- var r0 wire.SNACMessage
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)); ok {
- return returnFunc(ctx, instance, inFrame, inBody)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) wire.SNACMessage); ok {
- r0 = returnFunc(ctx, instance, inFrame, inBody)
- } else {
- r0 = ret.Get(0).(wire.SNACMessage)
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x04_AdminInfoChangeRequest) error); ok {
- r1 = returnFunc(ctx, instance, inFrame, inBody)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAdminService_InfoChangeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InfoChangeRequest'
- type mockAdminService_InfoChangeRequest_Call struct {
- *mock.Call
- }
- // InfoChangeRequest is a helper method to define mock.On call
- // - ctx context.Context
- // - instance *state.SessionInstance
- // - inFrame wire.SNACFrame
- // - inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest
- func (_e *mockAdminService_Expecter) InfoChangeRequest(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockAdminService_InfoChangeRequest_Call {
- return &mockAdminService_InfoChangeRequest_Call{Call: _e.mock.On("InfoChangeRequest", ctx, instance, inFrame, inBody)}
- }
- func (_c *mockAdminService_InfoChangeRequest_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest)) *mockAdminService_InfoChangeRequest_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 *state.SessionInstance
- if args[1] != nil {
- arg1 = args[1].(*state.SessionInstance)
- }
- var arg2 wire.SNACFrame
- if args[2] != nil {
- arg2 = args[2].(wire.SNACFrame)
- }
- var arg3 wire.SNAC_0x07_0x04_AdminInfoChangeRequest
- if args[3] != nil {
- arg3 = args[3].(wire.SNAC_0x07_0x04_AdminInfoChangeRequest)
- }
- run(
- arg0,
- arg1,
- arg2,
- arg3,
- )
- })
- return _c
- }
- func (_c *mockAdminService_InfoChangeRequest_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAdminService_InfoChangeRequest_Call {
- _c.Call.Return(sNACMessage, err)
- return _c
- }
- func (_c *mockAdminService_InfoChangeRequest_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x04_AdminInfoChangeRequest) (wire.SNACMessage, error)) *mockAdminService_InfoChangeRequest_Call {
- _c.Call.Return(run)
- return _c
- }
- // InfoQuery provides a mock function for the type mockAdminService
- func (_mock *mockAdminService) InfoQuery(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x02_AdminInfoQuery) (wire.SNACMessage, error) {
- ret := _mock.Called(ctx, instance, inFrame, inBody)
- if len(ret) == 0 {
- panic("no return value specified for InfoQuery")
- }
- var r0 wire.SNACMessage
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x02_AdminInfoQuery) (wire.SNACMessage, error)); ok {
- return returnFunc(ctx, instance, inFrame, inBody)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x02_AdminInfoQuery) wire.SNACMessage); ok {
- r0 = returnFunc(ctx, instance, inFrame, inBody)
- } else {
- r0 = ret.Get(0).(wire.SNACMessage)
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x07_0x02_AdminInfoQuery) error); ok {
- r1 = returnFunc(ctx, instance, inFrame, inBody)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockAdminService_InfoQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InfoQuery'
- type mockAdminService_InfoQuery_Call struct {
- *mock.Call
- }
- // InfoQuery is a helper method to define mock.On call
- // - ctx context.Context
- // - instance *state.SessionInstance
- // - inFrame wire.SNACFrame
- // - inBody wire.SNAC_0x07_0x02_AdminInfoQuery
- func (_e *mockAdminService_Expecter) InfoQuery(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockAdminService_InfoQuery_Call {
- return &mockAdminService_InfoQuery_Call{Call: _e.mock.On("InfoQuery", ctx, instance, inFrame, inBody)}
- }
- func (_c *mockAdminService_InfoQuery_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x02_AdminInfoQuery)) *mockAdminService_InfoQuery_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 *state.SessionInstance
- if args[1] != nil {
- arg1 = args[1].(*state.SessionInstance)
- }
- var arg2 wire.SNACFrame
- if args[2] != nil {
- arg2 = args[2].(wire.SNACFrame)
- }
- var arg3 wire.SNAC_0x07_0x02_AdminInfoQuery
- if args[3] != nil {
- arg3 = args[3].(wire.SNAC_0x07_0x02_AdminInfoQuery)
- }
- run(
- arg0,
- arg1,
- arg2,
- arg3,
- )
- })
- return _c
- }
- func (_c *mockAdminService_InfoQuery_Call) Return(sNACMessage wire.SNACMessage, err error) *mockAdminService_InfoQuery_Call {
- _c.Call.Return(sNACMessage, err)
- return _c
- }
- func (_c *mockAdminService_InfoQuery_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x07_0x02_AdminInfoQuery) (wire.SNACMessage, error)) *mockAdminService_InfoQuery_Call {
- _c.Call.Return(run)
- return _c
- }
|