public void TestThatFlightHasCorrectBasePriceFor20DayFlight() { DateTime dateTestFlightLeaves = new DateTime(2011, 3, 18); DateTime dateTestFlightReturns = new DateTime(2011, 4, 7); var target = new Flight(dateTestFlightLeaves, dateTestFlightReturns, someMiles); Assert.AreEqual(600, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDays() { DateTime start = new DateTime(2005, 9, 17); DateTime end = new DateTime(2005, 9, 19); var target = new Flight(start, end, 500); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTravelOnSameDay() { DateTime dateFlightLeaves = new DateTime(2012, 1, 1); DateTime dateFlightReturns = new DateTime(2012, 1, 1); var target = new Flight(dateFlightLeaves, dateFlightReturns, mileage); Assert.AreEqual(200, target.getBasePrice()); }
public void TesThatFlightHasCorrectBasePriceForOneDayFlight() { DateTime dateTestFlightLeaves = new DateTime(2010, 1, 18); DateTime dateTestFlightReturns = new DateTime(2010, 1, 19); var target = new Flight(dateTestFlightLeaves, dateTestFlightReturns, someMiles); Assert.AreEqual(220, target.getBasePrice()); }
public void TestThatFlightBookingPriceCorrectZeroDayDifference() { DateTime startDate = new DateTime(2012, 3, 4); DateTime endDate = new DateTime(2012, 3, 4); var target = new Flight(startDate, endDate, 5); Assert.AreEqual(200, target.getBasePrice()); }
public void TestThatFlightHasIncorrectBasePriceFor1DayFlight() { DateTime dateTestFlightLeaves = new DateTime(2011, 3, 18); DateTime dateTestFlightReturns = new DateTime(2011, 3, 19); var target = new Flight(dateTestFlightLeaves, dateTestFlightReturns, someMiles); Assert.AreNotEqual(230, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDayTrip() { var start = new DateTime(1999, 1, 1); var end = new DateTime(1999, 1, 3); int miles = 100; var target = new Flight(start, end, miles); Assert.AreEqual(240, target.getBasePrice()); }
public void TestTwoDaySpan() { var target = new Flight(new DateTime(2010, 1, 18), new DateTime(2010, 1, 20), 67); Assert.AreEqual(240, target.getBasePrice()); }
public void TestFlightPrice() { var target = new Flight(System.DateTime.Now, System.DateTime.Now, 100); Assert.AreEqual(200, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForOneDayFlight() { var target = new Flight(startDate, endDate, miles); Assert.AreEqual(220, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight() { var target = new Flight(new DateTime(2011, 2, 5), new DateTime(2011, 2, 7), 50); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTenDaysApart() { var target = new Flight((new DateTime(2012, 1, 1, 7, 0, 0)), (new DateTime(2012, 1, 11, 7, 0, 0)), 500); Assert.AreEqual(400, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight() { var target = new Flight(startDate, endDate+TimeSpan.FromDays(1), miles); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatHasCorrectBasePriceTwoDay() { var target = new Flight(startDate, new DateTime(2010, 10,20), miles); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatUserTotalCostIsCorrect() { var flight = new Flight(StartDate, EndDate, 500); target.book(flight); Assert.AreEqual(flight.getBasePrice(), target.Price); }
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight() { var target = new Flight(startDate, new DateTime(2011,1,3), flightMiles); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForThreeDayFlight() { var target = new Flight(new DateTime(2011, 1, 1), new DateTime(2011, 1, 4), miles); Assert.AreEqual(260, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDays() { var target = new Flight(DateTime.Now, DateTime.Now.AddDays(2), 5); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTenDays() { var target = new Flight(DateTime.Now, DateTime.Now.AddDays(10), 10); Assert.AreEqual((200+10*20), target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForOneDay() { var target = new Flight(DateTime.Now, DateTime.Now.AddDays(1), 1); Assert.AreEqual(220, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForFourDaysBridgingLeapYearFebruaryMonth() { var target = new Flight(DateThatFlightReturnsInLeapYearFebruary, DateThatFlightReturnsAfterLeapYearFebruary, someMiles); Assert.AreEqual(280, target.getBasePrice()); }
public void TestFlightPriceTenDaySpread() { var flight = new Flight(new DateTime(2012, 3, 14), new DateTime(2012, 3, 24), 333); Assert.AreEqual(flight.getBasePrice(), 400); }
public void TestThatPriceIsCorrect() { var target = new Flight(startDate, endDate, miles); Assert.AreEqual(target.getBasePrice(), 200+20*9); }
public void TestThatFlightHasCorrectBasePriceForThreeDaysBridgingMonths() { var target = new Flight(DateThatFlightLeaves, DateThatFlightReturnsNextMonth, someMiles); Assert.AreEqual(260, target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight() { var target = new Flight(date1, dateTwo, 300); Assert.AreEqual(200 + ((2) * 20), target.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDays() { var target = new Flight(DateThatFlightLeaves, DateThatFlightReturns, someMiles); Assert.AreEqual(240, target.getBasePrice()); }
public void TestThatUserTotalCostIsCorrectWhenMoreThanFlights() { var car = new Car(5); var flight = new Flight(StartDate, EndDate, 500); target.book(flight); target.book(car); Assert.AreEqual(flight.getBasePrice() + car.getBasePrice(), target.Price); }
public void TestGetBasePriceWithFiveDays() { Flight flight1 = new Flight(startDate, new DateTime(2012, 3, 18), someMiles); Assert.AreEqual(300, flight1.getBasePrice()); }
public void TestThatFlightHasCorrectBasePriceForTwoDayApart() { var target = new Flight((new DateTime(2012, 1, 1, 7, 0, 0)), (new DateTime(2012, 1, 3, 7, 0, 0)), 200); Assert.AreEqual(240, target.getBasePrice()); }
public void TestGetBasePriceWithOneDay() { Flight flight1 = new Flight(startDate, endDate, someMiles); Assert.AreEqual(220, flight1.getBasePrice()); }