public void TrainTimeClassLessThanOrEqualToOperatorReturnsFalseIfTimePropertyOfFirstOperandIsAfterTimePropertyOfSecondOperand() { TrainTime testParam0 = TrainTimeHelpers.GetTrainTime(); TrainTime testParam1 = TrainTimeHelpers.GetTrainTimeBefore(testParam0.Time); bool testOutput = testParam0 <= testParam1; Assert.IsFalse(testOutput); }
public void TrainTimeClass_CompareToMethodWithObjectParameter_ReturnsOne_IfParameterIsTrainTimeObjectWithTimePropertyBeforeTimePropertyOfThisObject() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); object testParam = TrainTimeHelpers.GetTrainTimeBefore(testObject.Time); int testOutput = testObject.CompareTo(testParam); Assert.AreEqual(1, testOutput); }
public void TrainTimeClassGreaterThanOperatorReturnsTrueIfTimePropertyOfFirstOperandIsAfterTimePropertyOfSecondOperand() { TrainTime testParam0 = TrainTimeHelpers.GetTrainTime(); TrainTime testParam1 = TrainTimeHelpers.GetTrainTimeBefore(testParam0.Time); bool testOutput = testParam0 > testParam1; Assert.IsTrue(testOutput); }
private static TrainLocationTime GetTrainLocationTime(TimeOfDay beforeTime) { return(new TrainLocationTime { ArrivalTime = TrainTimeHelpers.GetTrainTimeBefore(beforeTime), DepartureTime = TrainTimeHelpers.GetTrainTimeBefore(beforeTime), FormattingStrings = new TimeDisplayFormattingStrings { Complete = "h{0}mmf", Hours = "h", Minutes = "mmf", TimeWithoutFootnotes = "h mmf", }, Line = _rnd.NextString(_rnd.Next(2)), Location = new Location(), Pass = _rnd.NextBoolean(), Path = _rnd.NextString(_rnd.Next(2)), Platform = _rnd.NextString(_rnd.Next(2)), }); }