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)); }
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)); }
public void TestEqualsMethodWithTwoEquivalentFlights() { Flight flight1 = new Flight(startDate, endDate, someMiles); Flight flight2 = new Flight(startDate, endDate, someMiles); Assert.True(flight1.Equals(flight2)); }
public void TestThatAFlightDoesNotEqualAnotherObject() { var flight = new Flight(StartTime, EndTime, miles); var hotel = new Hotel(5); Assert.False(flight.Equals(hotel)); }
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)); }
public void TestThatTwoFlightsAreEqual() { var flightOne = new Flight(StartTime, EndTime, miles); var flightTwo = new Flight(StartTime, EndTime, miles); Assert.True(flightOne.Equals(flightTwo)); }
public void TestEqualsMethodWithTwoDifferentFlights() { Flight flight1 = new Flight(startDate, endDate, 500); Flight flight2 = new Flight(startDate, endDate, 100); Assert.False(flight1.Equals(flight2)); }
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)); }
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)); }
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)); }
public void TestThatTwoFlightsAreNotEqualWithDifferentMiles() { var flightOne = new Flight(StartTime, EndTime, miles); var flightTwo = new Flight(StartTime, EndTime, 432); Assert.False(flightOne.Equals(flightTwo)); }
public void TestThatFlightEqualsReturnsTrueOnSameFlight() { var target = new Flight(startDate, endDate, 1000); Assert.True(target.Equals(target)); }
public void TestThatFlightEqualsReturnsTrueOnSameFlightInfoReverse() { var target1 = new Flight(startDate, endDate, 1000); var target2 = new Flight(startDate, endDate, 1000); Assert.True(target2.Equals(target1)); }
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)); }
public void TestThatFlightEqualsReturnsFalseOnObjectOtherThanFlight() { var target = new Flight(startDate, endDate, 1001); var hotel = new Hotel(10); Assert.False(target.Equals(hotel)); }
public void TestFlightEquals() { var target1 = new Flight(new DateTime(1990, 2, 3), new DateTime(1991, 2, 3), 100); var target2 = new Flight(new DateTime(1990, 2, 3), new DateTime(1991, 2, 3), 100); Assert.AreEqual(true, target1.Equals(target2)); }
public void TestTathFlightsAreEqual() { var target = new Flight(new DateTime(2011, 3, 17), new DateTime(2011, 3, 18), 5000); var target2 = new Flight(new DateTime(2011, 3, 17), new DateTime(2011, 3, 18), 5000); Assert.True(target.Equals( target2)); }
public void TestThatFlightsAreNotEqual() { var target = new Flight(DateThatFlightLeaves, DateThatFlightReturns, someMiles); var target2 = new Flight(DateThatFlightLeaves, DateThatFlightReturnsNextMonth, someMiles); Assert.IsFalse(target.Equals(target2)); }
public void TestFlightEqualOnTrue() { var target = new Flight(startDate, new DateTime(2011, 3, 11), 100); Assert.True(target.Equals(new Flight(startDate, new DateTime(2011, 3, 11), 100))); }
public void TestThatTwoFlightsNotEqual() { var start = new DateTime(1999, 1, 1); var end = new DateTime(1999, 1, 2); int miles = 100; var flight = new Flight(start, end, miles); //var start1 = new DateTime(1999, 1, 1); //var end1 = new DateTime(1999, 1, 4); //int miles1 = 200; var notFlight = new User("NotAFlight"); Assert.False(flight.Equals(notFlight)); }
public void TestThatTwoFlightsAreEqual() { var start = new DateTime(1999, 1, 1); var end = new DateTime(1999, 1, 2); int miles = 100; var flight = new Flight(start, end, miles); var start1 = new DateTime(1999, 1, 1); var end1 = new DateTime(1999, 1, 2); int miles1 = 100; var flight1 = new Flight(start1, end1, miles1); Assert.True(flight.Equals(flight1)); }
public void TestThatOverrideBoolEqualsReturnsFlightObject() { var target = new Flight(dateFlightLeaves, dateFlightReturns, mileage); Assert.True(target.Equals(target)); }
public void TestThatFlightsAreEqual() { var target = new Flight(DateThatFlightLeaves, DateThatFlightReturns, someMiles); var target2 = new Flight(DateThatFlightLeaves, DateThatFlightReturns, someMiles); Assert.IsTrue(target.Equals(target2)); }
public void TestIfTwoFlightsAreNotEqual() { var target = new Flight(startDate, endDate, 20); var target1 = new Flight(startDate, endDate, 19); Assert.AreEqual(false, target.Equals(target1)); }
public void TestThatFlightEqualsReturnsFalseOnDifferentEndDate() { var target1 = new Flight(startDate, new DateTime(2010, 11, 20), 1000); var target2 = new Flight(startDate, endDate, 1000); Assert.False(target1.Equals(target2)); }
public void TestThatFlightEqualsReturnsFalseOnDifferentMilesReverse() { var target1 = new Flight(startDate, endDate, 1001); var target2 = new Flight(startDate, endDate, 1000); Assert.False(target2.Equals(target1)); }
public void TestFlightsEqual() { var FlightA = new Flight(DateTime.Now, DateTime.MaxValue, milesForFlight); var FlightB = new Flight(DateTime.Now, DateTime.MaxValue, milesForFlight); Assert.True(FlightA.Equals(FlightB)); }
public void TestFlightEqualsMethod() { var target = new Flight(DateTime.Today, DateTime.Today.AddDays(10), 500); var target2 = new Flight(DateTime.Today, DateTime.Today.AddDays(10), 500); Assert.IsTrue(target.Equals(target2)); }