public void CompareToIsImplemented() { WarpingMomentOfInertia metertothesixth = WarpingMomentOfInertia.FromMetersToTheSixth(1); Assert.Equal(0, metertothesixth.CompareTo(metertothesixth)); Assert.True(metertothesixth.CompareTo(WarpingMomentOfInertia.Zero) > 0); Assert.True(WarpingMomentOfInertia.Zero.CompareTo(metertothesixth) < 0); }
public void CompareToThrowsOnNull() { WarpingMomentOfInertia metertothesixth = WarpingMomentOfInertia.FromMetersToTheSixth(1); Assert.Throws<ArgumentNullException>(() => metertothesixth.CompareTo(null)); }
public void CompareToThrowsOnTypeMismatch() { WarpingMomentOfInertia metertothesixth = WarpingMomentOfInertia.FromMetersToTheSixth(1); Assert.Throws<ArgumentException>(() => metertothesixth.CompareTo(new object())); }