// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package http import ( "context" "github.com/mk6i/open-oscar-server/state" mock "github.com/stretchr/testify/mock" ) // newMockChatRoomRetriever creates a new instance of mockChatRoomRetriever. 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 newMockChatRoomRetriever(t interface { mock.TestingT Cleanup(func()) }) *mockChatRoomRetriever { mock := &mockChatRoomRetriever{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // mockChatRoomRetriever is an autogenerated mock type for the ChatRoomRetriever type type mockChatRoomRetriever struct { mock.Mock } type mockChatRoomRetriever_Expecter struct { mock *mock.Mock } func (_m *mockChatRoomRetriever) EXPECT() *mockChatRoomRetriever_Expecter { return &mockChatRoomRetriever_Expecter{mock: &_m.Mock} } // AllChatRooms provides a mock function for the type mockChatRoomRetriever func (_mock *mockChatRoomRetriever) AllChatRooms(ctx context.Context, exchange uint16) ([]state.ChatRoom, error) { ret := _mock.Called(ctx, exchange) if len(ret) == 0 { panic("no return value specified for AllChatRooms") } var r0 []state.ChatRoom var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uint16) ([]state.ChatRoom, error)); ok { return returnFunc(ctx, exchange) } if returnFunc, ok := ret.Get(0).(func(context.Context, uint16) []state.ChatRoom); ok { r0 = returnFunc(ctx, exchange) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]state.ChatRoom) } } if returnFunc, ok := ret.Get(1).(func(context.Context, uint16) error); ok { r1 = returnFunc(ctx, exchange) } else { r1 = ret.Error(1) } return r0, r1 } // mockChatRoomRetriever_AllChatRooms_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllChatRooms' type mockChatRoomRetriever_AllChatRooms_Call struct { *mock.Call } // AllChatRooms is a helper method to define mock.On call // - ctx context.Context // - exchange uint16 func (_e *mockChatRoomRetriever_Expecter) AllChatRooms(ctx interface{}, exchange interface{}) *mockChatRoomRetriever_AllChatRooms_Call { return &mockChatRoomRetriever_AllChatRooms_Call{Call: _e.mock.On("AllChatRooms", ctx, exchange)} } func (_c *mockChatRoomRetriever_AllChatRooms_Call) Run(run func(ctx context.Context, exchange uint16)) *mockChatRoomRetriever_AllChatRooms_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uint16 if args[1] != nil { arg1 = args[1].(uint16) } run( arg0, arg1, ) }) return _c } func (_c *mockChatRoomRetriever_AllChatRooms_Call) Return(chatRooms []state.ChatRoom, err error) *mockChatRoomRetriever_AllChatRooms_Call { _c.Call.Return(chatRooms, err) return _c } func (_c *mockChatRoomRetriever_AllChatRooms_Call) RunAndReturn(run func(ctx context.Context, exchange uint16) ([]state.ChatRoom, error)) *mockChatRoomRetriever_AllChatRooms_Call { _c.Call.Return(run) return _c }