public async Task <EventRoomWithDetailsResponse> GetByIdWithDetails(long id) { var coffeePlace = await _eventRoomRepository .GetByIdAsync(id); return(new EventRoomWithDetailsResponse(coffeePlace)); }
public async Task Should_get_a_event_room_by_id() { const long eventRoomId = 1; var eventRoom = new EventRoomBuilder() .WithId(eventRoomId) .Build(); _eventRoomRepository .GetByIdAsync(eventRoomId) .Returns(eventRoom); var ceventRoomResponse = await _eventRoomService .GetByIdWithDetails(eventRoomId); ceventRoomResponse .Should() .BeEquivalentTo(eventRoom, opt => opt.ExcludingMissingMembers()); }