Beispiel #1
0
        public async Task Should_Insert_ANewReservation()
        {
            var code        = _bookingDataServices.NewId();
            var bookingData = _bookingDataServices.GetNewDo(code);
            var booking     = await _bookingDataServices.GetPagedSummaryDoAsync(1, 2);

            var item = booking.FirstOrDefault();

            Assert.NotNull(item);
            Assert.NotNull(bookingData.Value);
            if (item != null)
            {
                var asyncValue = await _bookingDataServices.GetDoAsync(item.BookingNumber);

                var dto = bookingData.Value;
                bookingData.Value            = asyncValue.Value;
                bookingData.Value.NUMERO_RES = dto.NUMERO_RES;
                bookingData.Value.Items      = new List <BookingItemsDto>();
                var outValue = await _bookingDataServices.SaveAsync(bookingData);

                Assert.IsTrue(outValue);
            }
        }