// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package webapi import ( "context" "github.com/mk6i/open-oscar-server/state" "github.com/mk6i/open-oscar-server/wire" mock "github.com/stretchr/testify/mock" ) // newMockICBMService creates a new instance of mockICBMService. 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 newMockICBMService(t interface { mock.TestingT Cleanup(func()) }) *mockICBMService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mockICBMService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mockICBMService is an autogenerated mock type for the ICBMService type type mockICBMService struct { mock.Mock } type mockICBMService_Expecter struct { mock *mock.Mock } func (_m *mockICBMService) EXPECT() *mockICBMService_Expecter { return &mockICBMService_Expecter{mock: &_m.Mock} } // ChannelMsgToHost provides a mock function for the type mockICBMService func (_mock *mockICBMService) ChannelMsgToHost(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x06_ICBMChannelMsgToHost) (*wire.SNACMessage, error) { ret := _mock.Called(ctx, instance, inFrame, inBody) if len(ret) == 0 { panic("no return value specified for ChannelMsgToHost") } var r0 *wire.SNACMessage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x04_0x06_ICBMChannelMsgToHost) (*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_0x04_0x06_ICBMChannelMsgToHost) *wire.SNACMessage); ok { r0 = returnFunc(ctx, instance, inFrame, inBody) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*wire.SNACMessage) } } if returnFunc, ok := ret.Get(1).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x04_0x06_ICBMChannelMsgToHost) error); ok { r1 = returnFunc(ctx, instance, inFrame, inBody) } else { r1 = ret.Error(1) } return r0, r1 } // mockICBMService_ChannelMsgToHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelMsgToHost' type mockICBMService_ChannelMsgToHost_Call struct { *mock.Call } // ChannelMsgToHost is a helper method to define mock.On call // - ctx context.Context // - instance *state.SessionInstance // - inFrame wire.SNACFrame // - inBody wire.SNAC_0x04_0x06_ICBMChannelMsgToHost func (_e *mockICBMService_Expecter) ChannelMsgToHost(ctx any, instance any, inFrame any, inBody any) *mockICBMService_ChannelMsgToHost_Call { return &mockICBMService_ChannelMsgToHost_Call{Call: _e.mock.On("ChannelMsgToHost", ctx, instance, inFrame, inBody)} } func (_c *mockICBMService_ChannelMsgToHost_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x06_ICBMChannelMsgToHost)) *mockICBMService_ChannelMsgToHost_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_0x04_0x06_ICBMChannelMsgToHost if args[3] != nil { arg3 = args[3].(wire.SNAC_0x04_0x06_ICBMChannelMsgToHost) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *mockICBMService_ChannelMsgToHost_Call) Return(sNACMessage *wire.SNACMessage, err error) *mockICBMService_ChannelMsgToHost_Call { _c.Call.Return(sNACMessage, err) return _c } func (_c *mockICBMService_ChannelMsgToHost_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x06_ICBMChannelMsgToHost) (*wire.SNACMessage, error)) *mockICBMService_ChannelMsgToHost_Call { _c.Call.Return(run) return _c } // ClientEvent provides a mock function for the type mockICBMService func (_mock *mockICBMService) ClientEvent(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x14_ICBMClientEvent) error { ret := _mock.Called(ctx, instance, inFrame, inBody) if len(ret) == 0 { panic("no return value specified for ClientEvent") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, *state.SessionInstance, wire.SNACFrame, wire.SNAC_0x04_0x14_ICBMClientEvent) error); ok { r0 = returnFunc(ctx, instance, inFrame, inBody) } else { r0 = ret.Error(0) } return r0 } // mockICBMService_ClientEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientEvent' type mockICBMService_ClientEvent_Call struct { *mock.Call } // ClientEvent is a helper method to define mock.On call // - ctx context.Context // - instance *state.SessionInstance // - inFrame wire.SNACFrame // - inBody wire.SNAC_0x04_0x14_ICBMClientEvent func (_e *mockICBMService_Expecter) ClientEvent(ctx any, instance any, inFrame any, inBody any) *mockICBMService_ClientEvent_Call { return &mockICBMService_ClientEvent_Call{Call: _e.mock.On("ClientEvent", ctx, instance, inFrame, inBody)} } func (_c *mockICBMService_ClientEvent_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x14_ICBMClientEvent)) *mockICBMService_ClientEvent_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_0x04_0x14_ICBMClientEvent if args[3] != nil { arg3 = args[3].(wire.SNAC_0x04_0x14_ICBMClientEvent) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *mockICBMService_ClientEvent_Call) Return(err error) *mockICBMService_ClientEvent_Call { _c.Call.Return(err) return _c } func (_c *mockICBMService_ClientEvent_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x04_0x14_ICBMClientEvent) error) *mockICBMService_ClientEvent_Call { _c.Call.Return(run) return _c } // OfflineRetrieve provides a mock function for the type mockICBMService func (_mock *mockICBMService) OfflineRetrieve(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 OfflineRetrieve") } 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 } // mockICBMService_OfflineRetrieve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OfflineRetrieve' type mockICBMService_OfflineRetrieve_Call struct { *mock.Call } // OfflineRetrieve is a helper method to define mock.On call // - ctx context.Context // - instance *state.SessionInstance // - inFrame wire.SNACFrame func (_e *mockICBMService_Expecter) OfflineRetrieve(ctx any, instance any, inFrame any) *mockICBMService_OfflineRetrieve_Call { return &mockICBMService_OfflineRetrieve_Call{Call: _e.mock.On("OfflineRetrieve", ctx, instance, inFrame)} } func (_c *mockICBMService_OfflineRetrieve_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame)) *mockICBMService_OfflineRetrieve_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 *mockICBMService_OfflineRetrieve_Call) Return(sNACMessage wire.SNACMessage, err error) *mockICBMService_OfflineRetrieve_Call { _c.Call.Return(sNACMessage, err) return _c } func (_c *mockICBMService_OfflineRetrieve_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame) (wire.SNACMessage, error)) *mockICBMService_OfflineRetrieve_Call { _c.Call.Return(run) return _c }