public ActionResult <SeatDto> GetSeat(Int32 id) { try { return((SeatDto)_service.GetSeat(id)); } catch (InvalidOperationException) { return(NotFound()); } }
public void PutSeatTest() { // Arrange var newSeat = new SeatDto { Id = 4, BookerName = "trial_overwrite" }; var result = _seatsController.PutSeat(4, newSeat); // Assert var objectResult = _service.GetSeat(4); Assert.Equal("trial_overwrite", objectResult.BookerName); }