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