public void Compare_Hotel2BiggerRating_ReturnsHotel1() { Hotel hotel1 = new HotelBridgewood(); Hotel hotel2 = new HotelRidgewood(); // bigger rating Hotel result = Rating.Compare(hotel1, hotel2); Assert.AreNotEqual(hotel1, result); }
public void Calculate_FinalPriceForClientRewardBridgewood_ReturnsInvalid() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelBridgewood(); // 110 weekday, 50 weekend Client client = new ClientReward(dates); double result = hotel.fee.Calculate(client); double expected = 230.0; // 110 + 110 + 50 Assert.AreNotEqual(expected, result); }
public void Calculate_FinalPriceForClientRegularBridgewood_ReturnsFeePrice() { string[] dates = new string[] { "26Mar2009(thur)", "27Mar2009(fri)", "28Mar2009(sat)" }; // 2 weekdays, 1 weekend Hotel hotel = new HotelBridgewood(); // 160 weekday, 60 weekend Client client = new ClientRegular(dates); double result = hotel.fee.Calculate(client); double expected = 380.0; // 160 + 160 + 60 Assert.AreEqual(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); }