Exemplo n.º 1
0
        public void TrainTimeClassLessThanOrEqualToOperatorReturnsTrueIfTimePropertyOfFirstOperandIsBeforeTimePropertyOfSecondOperand()
        {
            TrainTime testParam0 = TrainTimeHelpers.GetTrainTime();
            TrainTime testParam1 = TrainTimeHelpers.GetTrainTimeAfter(testParam0.Time);

            bool testOutput = testParam0 <= testParam1;

            Assert.IsTrue(testOutput);
        }
Exemplo n.º 2
0
        public void TrainTimeClass_CompareToMethodWithObjectParameter_ReturnsMinusOne_IfParameterIsTrainTimeObjectWithTimePropertyLaterThanTimePropertyOfThisObject()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            object    testParam  = TrainTimeHelpers.GetTrainTimeAfter(testObject.Time);

            int testOutput = testObject.CompareTo(testParam);

            Assert.AreEqual(-1, testOutput);
        }
Exemplo n.º 3
0
        public void TrainTimeClassGreaterThanOperatorReturnsFalseIfTimePropertyOfFirstOperandIsBeforeTimePropertyOfSecondOperand()
        {
            TrainTime testParam0 = TrainTimeHelpers.GetTrainTime();
            TrainTime testParam1 = TrainTimeHelpers.GetTrainTimeAfter(testParam0.Time);

            bool testOutput = testParam0 > testParam1;

            Assert.IsFalse(testOutput);
        }