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