public ActionResult <SeatDto> GetSeat(Int32 id)
 {
     try
     {
         return((SeatDto)_service.GetSeat(id));
     }
     catch (InvalidOperationException)
     {
         return(NotFound());
     }
 }
Esempio n. 2
0
        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);
        }