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