public void CompareToIsImplemented() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); Assert.Equal(0, pascalpersecond.CompareTo(pascalpersecond)); Assert.True(pascalpersecond.CompareTo(PressureChangeRate.Zero) > 0); Assert.True(PressureChangeRate.Zero.CompareTo(pascalpersecond) < 0); }
public void CompareToIsImplemented() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); Assert.AreEqual(0, pascalpersecond.CompareTo(pascalpersecond)); Assert.Greater(pascalpersecond.CompareTo(PressureChangeRate.Zero), 0); Assert.Less(PressureChangeRate.Zero.CompareTo(pascalpersecond), 0); }
public void CompareToThrowsOnNull() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); // ReSharper disable once ReturnValueOfPureMethodIsNotUsed pascalpersecond.CompareTo(null); }
public void CompareToThrowsOnTypeMismatch() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); // ReSharper disable once ReturnValueOfPureMethodIsNotUsed pascalpersecond.CompareTo(new object()); }
public void CompareToThrowsOnNull() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); Assert.Throws <ArgumentNullException>(() => pascalpersecond.CompareTo(null)); }
public void CompareToThrowsOnTypeMismatch() { PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1); Assert.Throws <ArgumentException>(() => pascalpersecond.CompareTo(new object())); }