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