Beispiel #1
0
        public void CompareToIsImplemented()
        {
            SpecificArea squarefootperton = SpecificArea.FromSquareFootPerTons(1);

            Assert.Equal(0, squarefootperton.CompareTo(squarefootperton));
            Assert.True(squarefootperton.CompareTo(SpecificArea.Zero) > 0);
            Assert.True(SpecificArea.Zero.CompareTo(squarefootperton) < 0);
        }
Beispiel #2
0
        public void CompareToThrowsOnNull()
        {
            SpecificArea squarefootperton = SpecificArea.FromSquareFootPerTons(1);

            Assert.Throws <ArgumentNullException>(() => squarefootperton.CompareTo(null));
        }
Beispiel #3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            SpecificArea squarefootperton = SpecificArea.FromSquareFootPerTons(1);

            Assert.Throws <ArgumentException>(() => squarefootperton.CompareTo(new object()));
        }