public void VertexInformationTimeBasedComparerClassCompareMethodReturnsZeroIfBothParametersAreNull() { VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(null, null); Assert.AreEqual(0, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsZeroIfFirstParameterHasNullTimePropertyAndSecondParameterIsNull() { VertexInformation testParam = GetVertexInformation(null); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam, null); Assert.AreEqual(0, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsMinusOneIfFirstParameterHasNullTimePropertyAndSecondParameterIsNotNullAndHasNonNullTimeProperty() { VertexInformation testParam0 = GetVertexInformation(null); VertexInformation testParam1 = GetVertexInformation(_rnd.NextTimeOfDay()); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(-1, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsOneIfTimePropertyOfFirstParameterIsAfterTimePropertyOfSecondParameter() { VertexInformation testParam0 = GetVertexInformation(_rnd.NextTimeOfDayAfter(1)); VertexInformation testParam1 = GetVertexInformation(_rnd.NextTimeOfDayBefore(testParam0.Time)); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(1, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsZeroIfTImePropertyOfFirstParameterIsSameAsTimePropertyOfSecondParameter() { VertexInformation testParam0 = GetVertexInformation(_rnd.NextTimeOfDay()); VertexInformation testParam1 = GetVertexInformation(testParam0.Time); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(0, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsMinusOneIfTimePropertyOfFirstParameterIsBeforeTimePropertyOfSecondParameter() { VertexInformation testParam0 = GetVertexInformation(_rnd.NextTimeOfDayBefore(86398)); // make sure there are a couple of seconds left in the day VertexInformation testParam1 = GetVertexInformation(_rnd.NextTimeOfDayAfter(testParam0.Time)); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(-1, testOutput); }
public void VertexInformationTimeBasedComparerClassCompareMethodReturnsZeroIfBothParametersHaveNullTimeProperty() { VertexInformation testParam0 = GetVertexInformation(null); VertexInformation testParam1 = GetVertexInformation(null); VertexInformationTimeBasedComparer testObject = new VertexInformationTimeBasedComparer(); int testOutput = testObject.Compare(testParam0, testParam1); Assert.AreEqual(0, testOutput); }