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