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