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_FinalPriceForClientRegularLakewood_ReturnsInvalid() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelLakewood(); // 110 weekday, 90 weekend Client client = new ClientRegular(dates); double result = hotel.fee.Calculate(client); double expected = 350.0; // 110 + 110 + 90 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); }