Esempio n. 1
0
        public void ShouldUpdateHall()
        {
            //Arrange
            Hall hall = CreateHall();

            hallService.CreateHall(hall);

            string        updatedHallName = "UpdatedName";
            UpdateHallDTO updateHall      = new UpdateHallDTO {
                Id = hall.Id, HallName = updatedHallName, Rows = new List <RowDTO> {
                    new RowDTO {
                        RowIndex = 1, Seats = new List <SeatDTO> {
                            new SeatDTO {
                                ColumnIndex = 1, Status = SeatStatus.Excluded
                            }
                        }
                    }
                }
            };

            //Act
            hallService.UpdateHall(updateHall);

            //Assert
            Assert.Equal(updatedHallName, hall.HallName);
            Assert.Single(hall.Rows);
            Assert.Single(hall.Rows[0].Seats);
        }
Esempio n. 2
0
 public ActionResult <List <Hall> > UpdateHall(UpdateHallDTO hall)
 {
     return(Ok(hallService.UpdateHall(hall)));
 }