public void CompareTo()
 {
     TestHelper.TestCompareToStruct(one, one, threeMillion);
     TestHelper.TestCompareToStruct(Instant.MinValue, Instant.MinValue, Instant.MaxValue);
     TestHelper.TestNonGenericCompareTo(one, one, threeMillion);
     TestHelper.TestNonGenericCompareTo(Instant.MinValue, Instant.MinValue, Instant.MaxValue);
 }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #7
0
 public void Comparision()
 {
     TestHelper.TestCompareToStruct(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);
 }