当前位置: 首页>>代码示例>>C#>>正文


C# Expedia.Flight类代码示例

本文整理汇总了C#中Expedia.Flight的典型用法代码示例。如果您正苦于以下问题:C# Flight类的具体用法?C# Flight怎么用?C# Flight使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Flight类属于Expedia命名空间,在下文中一共展示了Flight类的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());
 }
开发者ID:ycdfn,项目名称:Lab3-michaeaj,代码行数:7,代码来源:FlightTest.cs

示例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());
 }
开发者ID:spurrme,项目名称:Lab3-spurrme,代码行数:7,代码来源:FlightTest.cs

示例3: TestThatTwoFlightsAreEqual

        public void TestThatTwoFlightsAreEqual()
        {
            var flightOne = new Flight(StartTime, EndTime, miles);
            var flightTwo = new Flight(StartTime, EndTime, miles);

            Assert.True(flightOne.Equals(flightTwo));
        }
开发者ID:veatchje,项目名称:Lab3-veatchje,代码行数:7,代码来源:FlightTest.cs

示例4: 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());
 }
开发者ID:ycdfn,项目名称:Lab3-michaeaj,代码行数:7,代码来源:FlightTest.cs

示例5: TestThatAFlightDoesNotEqualAnotherObject

        public void TestThatAFlightDoesNotEqualAnotherObject()
        {
            var flight = new Flight(StartTime, EndTime, miles);
            var hotel = new Hotel(5);

            Assert.False(flight.Equals(hotel));
        }
开发者ID:veatchje,项目名称:Lab3-veatchje,代码行数:7,代码来源:FlightTest.cs

示例6: TestThatFlightsWithDifferentStartDatesAreNotEqual

        public void TestThatFlightsWithDifferentStartDatesAreNotEqual()
        {
            var f1 = new Flight(new DateTime(2014, 1, 1), ValidEndDate, ValidMiles);
            var f2 = new Flight(new DateTime(2014, 1, 2), ValidEndDate, ValidMiles);

            Assert.AreNotEqual(f1, f2);
        }
开发者ID:CSSE376,项目名称:savagejs,代码行数:7,代码来源:FlightTest.cs

示例7: TestThatFlightsWithDifferentMilesAreNotEqual

        public void TestThatFlightsWithDifferentMilesAreNotEqual()
        {
            var f1 = new Flight(ValidStartDate, ValidEndDate, 1);
            var f2 = new Flight(ValidStartDate, ValidEndDate, 2);

            Assert.AreNotEqual(f1, f2);
        }
开发者ID:CSSE376,项目名称:savagejs,代码行数:7,代码来源:FlightTest.cs

示例8: 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());
 }
开发者ID:vassardm,项目名称:Lab3-vassardm,代码行数:7,代码来源:FlightTest.cs

示例9: 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());
 }
开发者ID:ycdfn,项目名称:Lab3-michaeaj,代码行数:7,代码来源:FlightTest.cs

示例10: TestThatFlightInitializes

 public void TestThatFlightInitializes()
 {
     DateTime startDate = new DateTime(2012, 3, 4);
     DateTime endDate = new DateTime(2012, 3, 7);
     var target = new Flight(startDate, endDate, 5);
     Assert.IsNotNull(target);
 }
开发者ID:Feroxmrbrick,项目名称:Lab3-frankmp,代码行数:7,代码来源:FlightTest.cs

示例11: 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());
 }
开发者ID:Feroxmrbrick,项目名称:Lab3-frankmp,代码行数:7,代码来源:FlightTest.cs

示例12: TestFlightNotEqualToOtherObject

        public void TestFlightNotEqualToOtherObject()
        {
            var f1 = new Flight(ValidStartDate, ValidEndDate, ValidMiles);
            var o2 = new Object();

            Assert.AreNotEqual(f1, o2);
        }
开发者ID:CSSE376,项目名称:savagejs,代码行数:7,代码来源:FlightTest.cs

示例13: TestEqualsMethodWithTwoDifferentFlights

        public void TestEqualsMethodWithTwoDifferentFlights()
        {
            Flight flight1 = new Flight(startDate, endDate, 500);
            Flight flight2 = new Flight(startDate, endDate, 100);

            Assert.False(flight1.Equals(flight2));
        }
开发者ID:westeras,项目名称:Lab3-westeras,代码行数:7,代码来源:FlightTest.cs

示例14: TestEqualsMethodWithTwoEquivalentFlights

        public void TestEqualsMethodWithTwoEquivalentFlights()
        {
            Flight flight1 = new Flight(startDate, endDate, someMiles);
            Flight flight2 = new Flight(startDate, endDate, someMiles);

            Assert.True(flight1.Equals(flight2));
        }
开发者ID:westeras,项目名称:Lab3-westeras,代码行数:7,代码来源:FlightTest.cs

示例15: TestSameFlightsAreEqual

        public void TestSameFlightsAreEqual()
        {
            var f1 = new Flight(ValidStartDate, ValidEndDate, ValidMiles);
            var f2 = new Flight(ValidStartDate, ValidEndDate, ValidMiles);

            Assert.AreEqual(f1, f2);
        }
开发者ID:CSSE376,项目名称:savagejs,代码行数:7,代码来源:FlightTest.cs


注:本文中的Expedia.Flight类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。