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


C# Flight.Equals方法代码示例

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


在下文中一共展示了Flight.Equals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestThatFlightEqualsWorks

 public void TestThatFlightEqualsWorks()
 {
     var target = new Flight(System.DateTime.Today, System.DateTime.Parse("10/5/2012"), 100);
     var target2 = new Flight(System.DateTime.Today, System.DateTime.Parse("10/5/2012"), 100);
     var target3 = new Flight(System.DateTime.Today, System.DateTime.Parse("10/6/2012"), 100);
     Assert.True(target.Equals(target2));
     Assert.False(target.Equals(target3));
 }
开发者ID:kleinnj,项目名称:Lab3-kleinnj,代码行数:8,代码来源:FlightTest.cs

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: TestFlightsInequalityDueToMiles

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

示例9: TestFlightEqualsTrue

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

示例10: TestFlightsEquality

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

示例11: TestThatTwoFlightsAreNotEqualWithDifferentMiles

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

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

示例12: TestThatFlightEqualsReturnsTrueOnSameFlight

 public void TestThatFlightEqualsReturnsTrueOnSameFlight()
 {
     var target = new Flight(startDate, endDate, 1000);
     Assert.True(target.Equals(target));
 }
开发者ID:bellrj,项目名称:Lab3-bellrj,代码行数:5,代码来源:FlightTest.cs

示例13: TestThatFlightEqualsReturnsTrueOnSameFlightInfoReverse

 public void TestThatFlightEqualsReturnsTrueOnSameFlightInfoReverse()
 {
     var target1 = new Flight(startDate, endDate, 1000);
     var target2 = new Flight(startDate, endDate, 1000);
     Assert.True(target2.Equals(target1));
 }
开发者ID:bellrj,项目名称:Lab3-bellrj,代码行数:6,代码来源:FlightTest.cs

示例14: TestThatFlightEqualsReturnsFalseOnDifferentStartDateReverse

 public void TestThatFlightEqualsReturnsFalseOnDifferentStartDateReverse()
 {
     var target1 = new Flight(new DateTime(2010, 9, 20), endDate, 1000);
     var target2 = new Flight(startDate, endDate, 1000);
     Assert.False(target2.Equals(target1));
 }
开发者ID:bellrj,项目名称:Lab3-bellrj,代码行数:6,代码来源:FlightTest.cs

示例15: TestThatFlightEqualsReturnsFalseOnObjectOtherThanFlight

 public void TestThatFlightEqualsReturnsFalseOnObjectOtherThanFlight()
 {
     var target = new Flight(startDate, endDate, 1001);
     var hotel = new Hotel(10);
     Assert.False(target.Equals(hotel));
 }
开发者ID:bellrj,项目名称:Lab3-bellrj,代码行数:6,代码来源:FlightTest.cs


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