コード例 #1
0
        public void TestVerifyGuestPINBookingAccessor()
        {   //Pulls a guest from the database and collects the guest information
            List <HotelGuest> guest1 = HotelGuestAccessor.HotelGuestGet(100);
            //Checks using a pin in the database, stores guest info from database into a guest object
            //Asserts that a record is found, that guest is not null by passing the guest1 guest pin
            HotelGuest guest = BookingAccessor.VerifyHotelGuestPin(guest1[guest1.Count - 1].GuestPIN);

            Assert.IsNotNull(guest);
        }
コード例 #2
0
 /// <summary>
 /// Pat Banks
 /// Created: 2015/03/30
 ///
 /// Passes data to the Accessor to verify that the pin is not being used.
 /// </summary>
 /// <param name="inPIN">The pin to crossreference against</param>
 /// <returns>A HotelGuest object whose pin matches the one passed</returns>
 public HotelGuest CheckValidPIN(string inPIN)
 {
     try
     {
         //retrieve guest
         return(BookingAccessor.VerifyHotelGuestPin(inPIN));
     }
     catch (Exception ax)
     {
         throw ax;
     }
 }