public async Task GetReservation_WhenIdIsValid_ReturnsReservationDto() { var id = 8; var client = GetHttpClient(); ReservationDto reservationDto = null; var response = await client.GetAsync("api/reservations/" + id); if (response.IsSuccessStatusCode) { reservationDto = await response.Content.ReadAsAsync <ReservationDto>(); } Assert.IsNotNull(reservationDto, "Request success."); Assert.AreEqual(reservationDto.GetType(), typeof(ReservationDto), "ReservationDto returned."); }