本文整理汇总了C#中Expedia.Flight.getBasePrice方法的典型用法代码示例。如果您正苦于以下问题:C# Flight.getBasePrice方法的具体用法?C# Flight.getBasePrice怎么用?C# Flight.getBasePrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expedia.Flight
的用法示例。
在下文中一共展示了Flight.getBasePrice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestThatFlightHasCorrectBasePriceFor20DayFlight
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());
}
示例2: TestThatFlightHasCorrectBasePriceForTwoDays
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());
}
示例3: TestThatFlightHasCorrectBasePriceForTravelOnSameDay
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());
}
示例4: TesThatFlightHasCorrectBasePriceForOneDayFlight
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());
}
示例5: TestThatFlightBookingPriceCorrectZeroDayDifference
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());
}
示例6: TestThatFlightHasIncorrectBasePriceFor1DayFlight
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());
}
示例7: TestThatFlightHasCorrectBasePriceForTwoDayTrip
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());
}
示例8: TestTwoDaySpan
public void TestTwoDaySpan()
{
var target = new Flight(new DateTime(2010, 1, 18), new DateTime(2010, 1, 20), 67);
Assert.AreEqual(240, target.getBasePrice());
}
示例9: TestFlightPrice
public void TestFlightPrice()
{
var target = new Flight(System.DateTime.Now, System.DateTime.Now, 100);
Assert.AreEqual(200, target.getBasePrice());
}
示例10: TestThatFlightHasCorrectBasePriceForOneDayFlight
public void TestThatFlightHasCorrectBasePriceForOneDayFlight()
{
var target = new Flight(startDate, endDate, miles);
Assert.AreEqual(220, target.getBasePrice());
}
示例11: TestThatFlightHasCorrectBasePriceForTwoDayFlight
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight()
{
var target = new Flight(new DateTime(2011, 2, 5), new DateTime(2011, 2, 7), 50);
Assert.AreEqual(240, target.getBasePrice());
}
示例12: TestThatFlightHasCorrectBasePriceForTenDaysApart
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());
}
示例13: TestThatFlightHasCorrectBasePriceForTwoDayFlight
public void TestThatFlightHasCorrectBasePriceForTwoDayFlight()
{
var target = new Flight(startDate, endDate+TimeSpan.FromDays(1), miles);
Assert.AreEqual(240, target.getBasePrice());
}
示例14: TestThatHasCorrectBasePriceTwoDay
public void TestThatHasCorrectBasePriceTwoDay()
{
var target = new Flight(startDate, new DateTime(2010, 10,20), miles);
Assert.AreEqual(240, target.getBasePrice());
}
示例15: TestThatUserTotalCostIsCorrect
public void TestThatUserTotalCostIsCorrect()
{
var flight = new Flight(StartDate, EndDate, 500);
target.book(flight);
Assert.AreEqual(flight.getBasePrice(), target.Price);
}