public void Operators_SameCalendar() { LocalDateTime value1 = new LocalDateTime(2011, 1, 2, 10, 30, 0); LocalDateTime value2 = new LocalDateTime(2011, 1, 2, 10, 30, 0); LocalDateTime value3 = new LocalDateTime(2011, 1, 2, 10, 45, 0); TestHelper.TestOperatorComparisonEquality(value1, value2, value3); }
public void Comparisons(string smallerText, string greaterText) { var smaller = YearMonthDay.Parse(smallerText); var greater = YearMonthDay.Parse(greaterText); TestHelper.TestCompareToStruct(smaller, smaller, greater); TestHelper.TestOperatorComparisonEquality(smaller, smaller, greater); }
public void CompareTo_SameCalendar() { YearMonth yearMonth1 = new YearMonth(2011, 1); YearMonth yearMonth2 = new YearMonth(2011, 1); YearMonth yearMonth3 = new YearMonth(2011, 2); TestHelper.TestOperatorComparisonEquality(yearMonth1, yearMonth2, yearMonth3); }
public void Comparison() { Instant equal = new Instant(1, 100L); Instant greater1 = new Instant(1, 101L); Instant greater2 = new Instant(2, 0L); TestHelper.TestCompareToStruct(equal, equal, greater1); TestHelper.TestNonGenericCompareTo(equal, equal, greater1); TestHelper.TestOperatorComparisonEquality(equal, equal, greater1, greater2); }
public void Comparison() { var equal1 = new Duration(1, NodaConstants.NanosecondsPerHour); var equal2 = Duration.FromTicks(NodaConstants.TicksPerHour * 25); var greater1 = new Duration(1, NodaConstants.NanosecondsPerHour + 1); var greater2 = new Duration(2, 0L); TestHelper.TestCompareToStruct(equal1, equal2, greater1); TestHelper.TestNonGenericCompareTo(equal1, equal2, greater1); TestHelper.TestOperatorComparisonEquality(equal1, equal2, greater1, greater2); }
public void IEquatableIComparable_Tests() { var value = Offset.FromMilliseconds(12345); var equalValue = Offset.FromMilliseconds(12345); var greaterValue = Offset.FromMilliseconds(5432199); TestHelper.TestEqualsStruct(value, equalValue, greaterValue); TestHelper.TestCompareToStruct(value, equalValue, greaterValue); TestHelper.TestNonGenericCompareTo(value, equalValue, greaterValue); TestHelper.TestOperatorComparisonEquality(value, equalValue, greaterValue); }
public void IEquatableIComparable_Tests() { var value = new LocalInstant(12345); var equalValue = new LocalInstant(12345); var greaterValue = new LocalInstant(5432199); TestHelper.TestEqualsStruct(value, equalValue, greaterValue); TestHelper.TestCompareToStruct(value, equalValue, greaterValue); TestHelper.TestNonGenericCompareTo(value, equalValue, greaterValue); TestHelper.TestOperatorComparisonEquality(value, equalValue, greaterValue); }
public void Operators() { TestHelper.TestOperatorComparisonEquality(new AnnualDate(6, 19), new AnnualDate(6, 19), new AnnualDate(6, 20), new AnnualDate(7, 1)); }
public void Comparison() { TestHelper.TestCompareToStruct(negativeFiftyMillion, new Duration(-50000000), threeMillion); TestHelper.TestNonGenericCompareTo(negativeFiftyMillion, new Duration(-50000000), threeMillion); TestHelper.TestOperatorComparisonEquality(negativeFiftyMillion, new Duration(-50000000), threeMillion); }