public void Calculate_FinalPriceForClientRewardRidgewood_ReturnsFeePrice() { 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 = 240.0; // 100 + 100 + 40 Assert.AreEqual(expected, result); }
public void Calculate_FinalPriceForClientRewardLakewood_ReturnsInvalid() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelLakewood(); // 80 weekday, 80 weekend Client client = new ClientReward(dates); double result = hotel.fee.Calculate(client); double expected = 300.0; // 80 + 80 + 80 Assert.AreNotEqual(expected, result); }
public void Main_CheaperHotelReward3_RetursLakewood() { string[] dates = new string[] { "26Mar2009(mon)", "27Mar2009(tues)", "28Mar2009(wed)" }; Hotel lakewood = new HotelLakewood(); Hotel bridgewood = new HotelBridgewood(); Hotel ridgewood = new HotelRidgewood(); Hotel[] hotelBookings = new Hotel[] { lakewood, bridgewood, ridgewood }; Client client = new ClientReward(dates); Hotel result = Program.verifyCheaper(hotelBookings, client); Assert.AreEqual(lakewood, result); }