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