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