示例#1
0
        //[Ignore("One time test")]
        public async Task SaveReservation_Returns_Reservation_And_Reservation_Exists_In_Database()
        {
            AuthResult result = await _authService.LoginWithEmailAndPasswordAsync(_validatedUser, "testPassword");

            Assert.IsNotNull(result.User);
            Assert.IsNotNull(result.User.UserId);
            Assert.AreEqual("Success", result.Result); //check that preparation is successful

            _reservation.UserId = result.User.UserId;
            Reservation reservation = await _sut.SaveReservationAsync(_reservation);

            Assert.IsNotNull(reservation.ReservationId);

            string id = reservation.ReservationId;

            reservation = await _sut.FindReservationById(id);

            Assert.IsNotNull(reservation.ReservationId);
        }