public void GenericTimeModelComparerClassCompareMethodReturnsOneWhenFirstParameterIsValidObjectAndSecondParameterIsNull() { GenericTimeModelComparer testObject = GenericTimeModelComparer.Default; GenericTimeModel testParam0 = new GenericTimeModel { ActualTime = _rnd.NextTimeOfDay() }; GenericTimeModel testParam1 = null; int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(1, testOutput); }
public void GenericTimeModelComparerClassCompareMethodReturnsZeroWhenBothParametersAreObjectsWithActualTimePropertyEqualToNull() { GenericTimeModelComparer testObject = GenericTimeModelComparer.Default; GenericTimeModel testParam0 = new GenericTimeModel { ActualTime = null }; GenericTimeModel testParam1 = new GenericTimeModel { ActualTime = null }; int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(0, testOutput); }
public void GenericTimeModelComparerClassCompareMethodReturnsOneWhenFirstParameterActualTimePropertyIsAfterSecondParameterActualTimeProperty() { GenericTimeModelComparer testObject = GenericTimeModelComparer.Default; GenericTimeModel testParam0 = new GenericTimeModel { ActualTime = _rnd.NextTimeOfDayAfter(2) }; GenericTimeModel testParam1 = new GenericTimeModel { ActualTime = _rnd.NextTimeOfDayBefore(testParam0.ActualTime) }; int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(1, testOutput); }