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