// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package toc import ( "context" "github.com/mk6i/open-oscar-server/state" "github.com/mk6i/open-oscar-server/wire" mock "github.com/stretchr/testify/mock" ) // newMockChatService creates a new instance of mockChatService. 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 newMockChatService(t interface { mock.TestingT Cleanup(func()) }) *mockChatService { mock := &mockChatService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // mockChatService is an autogenerated mock type for the ChatService type type mockChatService struct { mock.Mock } type mockChatService_Expecter struct { mock *mock.Mock } func (_m *mockChatService) EXPECT() *mockChatService_Expecter { return &mockChatService_Expecter{mock: &_m.Mock} } // ChannelMsgToHost provides a mock function for the type mockChatService func (_mock *mockChatService) ChannelMsgToHost(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x0E_0x05_ChatChannelMsgToHost) (*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_0x0E_0x05_ChatChannelMsgToHost) (*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_0x0E_0x05_ChatChannelMsgToHost) *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_0x0E_0x05_ChatChannelMsgToHost) error); ok { r1 = returnFunc(ctx, instance, inFrame, inBody) } else { r1 = ret.Error(1) } return r0, r1 } // mockChatService_ChannelMsgToHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelMsgToHost' type mockChatService_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_0x0E_0x05_ChatChannelMsgToHost func (_e *mockChatService_Expecter) ChannelMsgToHost(ctx interface{}, instance interface{}, inFrame interface{}, inBody interface{}) *mockChatService_ChannelMsgToHost_Call { return &mockChatService_ChannelMsgToHost_Call{Call: _e.mock.On("ChannelMsgToHost", ctx, instance, inFrame, inBody)} } func (_c *mockChatService_ChannelMsgToHost_Call) Run(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x0E_0x05_ChatChannelMsgToHost)) *mockChatService_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_0x0E_0x05_ChatChannelMsgToHost if args[3] != nil { arg3 = args[3].(wire.SNAC_0x0E_0x05_ChatChannelMsgToHost) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *mockChatService_ChannelMsgToHost_Call) Return(sNACMessage *wire.SNACMessage, err error) *mockChatService_ChannelMsgToHost_Call { _c.Call.Return(sNACMessage, err) return _c } func (_c *mockChatService_ChannelMsgToHost_Call) RunAndReturn(run func(ctx context.Context, instance *state.SessionInstance, inFrame wire.SNACFrame, inBody wire.SNAC_0x0E_0x05_ChatChannelMsgToHost) (*wire.SNACMessage, error)) *mockChatService_ChannelMsgToHost_Call { _c.Call.Return(run) return _c }