示例#1
0
        public void GivenIEnterDataForTheFollowingFields(string firstName, string lastname, string price, string deposit, string startDate, string endDate)
        {
            //retrieving number of rows on the page so that we can compare that later on to find
            // whether a row has been added or not
            int CurrentRowCount = _bookingPage.GetCurrentRowsOnPage();

            //Generating a random number to create a unique record
            Random random = new Random();

            var NewBooking = new BookingRecord
            {
                FirstName = firstName,
                Surname   = "surname" + random.Next(10, 1000),
                Price     = price,
                Deposit   = deposit,
                CheckIn   = startDate,
                CheckOut  = endDate,
            };

            _bookingPage.CreateBooking(NewBooking);

            _bookingPage.WaitUntilRowHasBeenAdded(CurrentRowCount);

            FeatureContext.Current[NewlyCreatedBookingRecord] = NewBooking;
        }