public void CreateSeat_WhenModelValid_ShouldReturnNewId()
        {
            var seat = new SeatDto
            {
                Number = 11, AreaId = 1, Row = 12
            };

            var result = _venueService.CreateSeat(seat);

            Assert.AreEqual(result, ReturnIdSeat);
        }
Beispiel #2
0
        public void CreateSeat_WhenModelValid_ShouldInsertNewSeat()
        {
            using (var scope = new TransactionScope())
            {
                var seat = new SeatDto
                {
                    Number = 11, AreaId = 1, Row = 12
                };

                var result = _venueService.CreateSeat(seat);

                seat.Should().BeEquivalentTo(_venueService.GetSeat(result), options => options.Excluding(x => x.Id));
            }
        }