public void CompareToThrowsOnNull() { AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1); Assert.Throws <ArgumentNullException>(() => decibelvolt.CompareTo(null)); }
public void FromDecibelVolts_WithNanValue_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.NaN)); }
public void CompareToThrowsOnTypeMismatch() { AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1); Assert.Throws <ArgumentException>(() => decibelvolt.CompareTo(new object())); }
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(double?)"/> public static AmplitudeRatio?DecibelMillivolts(this double?value) => AmplitudeRatio.FromDecibelMillivolts(value);
public void FromDecibelVolts_WithInfinityValue_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.PositiveInfinity)); Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.NegativeInfinity)); }
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double?)"/> public static AmplitudeRatio?DecibelsUnloaded(this float?value) => AmplitudeRatio.FromDecibelsUnloaded(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(double)"/> public static AmplitudeRatio DecibelMillivolts(this long value) => AmplitudeRatio.FromDecibelMillivolts(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double?)"/> public static AmplitudeRatio?DecibelMicrovolts(this float?value) => AmplitudeRatio.FromDecibelMicrovolts(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double)"/> public static AmplitudeRatio DecibelMicrovolts(this decimal value) => AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value));
/// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(double)"/> public static AmplitudeRatio DecibelVolts(this float value) => AmplitudeRatio.FromDecibelVolts(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double)"/> public static AmplitudeRatio DecibelMicrovolts(this double value) => AmplitudeRatio.FromDecibelMicrovolts(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(double?)"/> public static AmplitudeRatio?DecibelVolts(this long?value) => AmplitudeRatio.FromDecibelVolts(value);
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double?)"/> public static AmplitudeRatio?DecibelsUnloaded(this decimal?value) => AmplitudeRatio.FromDecibelsUnloaded(value == null ? (double?)null : Convert.ToDouble(value.Value));
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double)"/> public static AmplitudeRatio DecibelsUnloaded(this decimal value) => AmplitudeRatio.FromDecibelsUnloaded(Convert.ToDouble(value));
public void EqualsReturnsFalseOnTypeMismatch() { AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1); Assert.False(decibelvolt.Equals(new object())); }
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double?)"/> public static AmplitudeRatio?DecibelMicrovolts(this decimal?value) => AmplitudeRatio.FromDecibelMicrovolts(value == null ? (double?)null : Convert.ToDouble(value.Value));
public void EqualsReturnsFalseOnNull() { AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1); Assert.False(decibelvolt.Equals(null)); }
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double)"/> public static AmplitudeRatio DecibelsUnloaded(this double value) => AmplitudeRatio.FromDecibelsUnloaded(value);