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