public void Compare_Hotel1BiggerRating_ReturnsHotel1() { Hotel hotel1 = new HotelRidgewood(); // bigger rating Hotel hotel2 = new HotelLakewood(); Hotel result = Rating.Compare(hotel1, hotel2); Assert.AreEqual(hotel1, result); }
public void Calculate_FinalPriceForClientRegularRidgewood_ReturnsFeePrice() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelRidgewood(); // 220 weekday, 150 weekend Client client = new ClientRegular(dates); double result = hotel.fee.Calculate(client); double expected = 590.0; // 220 + 220 + 150 Assert.AreEqual(expected, result); }
public void Calculate_FinalPriceForClientRewardRidgewood_ReturnsInvalidFee() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelRidgewood(); // 100 weekday, 40 weekend Client client = new ClientReward(dates); double result = hotel.fee.Calculate(client); double expected = 260.0; // 100 + 100 + 40 Assert.AreNotEqual(expected, result); }
public void Main_CheaperHotelRegular_RetursLakewood() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; Hotel lakewood = new HotelLakewood(); Hotel bridgewood = new HotelBridgewood(); Hotel ridgewood = new HotelRidgewood(); Hotel[] hotelBookings = new Hotel[] { lakewood, bridgewood, ridgewood }; Client client = new ClientRegular(dates); Hotel result = Program.verifyCheaper(hotelBookings, client); Assert.AreEqual(lakewood, result); }