• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Expedia.Flight类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Flight类属于Expedia命名空间,在下文中一共展示了Flight类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: TestFlightsInequalityDueToStartDate

 public void TestFlightsInequalityDueToStartDate()
 {
     DateTime rDate = DateTime.Now.AddDays(10);
     var target1 = new Flight(DateTime.Now, rDate, 10);
     var target2 = new Flight(DateTime.Now, rDate, 10);
     Assert.IsFalse(target1.Equals(target2));
 }
开发者ID:zhengc,项目名称:Lab3-zhengc,代码行数:7,代码来源:FlightTest.cs


示例17: TestFlightsInequalityDueToEndDate

 public void TestFlightsInequalityDueToEndDate()
 {
     DateTime sDate = DateTime.Now;
     var target1 = new Flight(sDate, DateTime.Now.AddDays(10), 10);
     var target2 = new Flight(sDate, DateTime.Now.AddDays(10), 10);
     Assert.IsFalse(target1.Equals(target2));
 }
开发者ID:zhengc,项目名称:Lab3-zhengc,代码行数:7,代码来源:FlightTest.cs


示例18: TestThatFlightInitializes

 public void TestThatFlightInitializes()
 {
     DateTime StartDate = new DateTime(2009, 11, 1);
     DateTime EndDate = new DateTime(2009, 11, 1);
     var target = new Flight(StartDate, EndDate, 700);
     Assert.IsNotNull(target);
 }
开发者ID:KimberlyBoucher,项目名称:Lab2-boucheka,代码行数:7,代码来源:FlightTest.cs


示例19: Equals

 private bool Equals(Flight obj)
 {
     bool l = obj.dateThatFlightLeaves.Equals(this.dateThatFlightLeaves);
     bool r = obj.dateThatFlightReturns.Equals(this.dateThatFlightReturns);
     bool m = obj.Miles.Equals(this.Miles);
     return l && r && m;
 }
开发者ID:henderea,项目名称:Lab3-henderea,代码行数:7,代码来源:Flight.cs


示例20: TestThatFlightThrowsOnBadDistance

 public void TestThatFlightThrowsOnBadDistance()
 {
     var start = new DateTime(1999, 1, 1);
     var end = new DateTime(1999, 1, 2);
     int miles = -5;
     var target = new Flight(start, end, miles);
 }
开发者ID:Watersdr,项目名称:Lab2-watersdr,代码行数:7,代码来源:FlightTest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Expedia.Hotel类代码示例发布时间:2022-05-24
下一篇:
C# Expedia.Car类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap