Exemplo n.º 1
0
        public void CompareToThrowsOnNull()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.Throws <ArgumentNullException>(() => decibelvolt.CompareTo(null));
        }
Exemplo n.º 2
0
 public void FromDecibelVolts_WithNanValue_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.NaN));
 }
Exemplo n.º 3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.Throws <ArgumentException>(() => decibelvolt.CompareTo(new object()));
        }
Exemplo n.º 4
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(double?)"/>
 public static AmplitudeRatio?DecibelMillivolts(this double?value) => AmplitudeRatio.FromDecibelMillivolts(value);
Exemplo n.º 5
0
 public void FromDecibelVolts_WithInfinityValue_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.PositiveInfinity));
     Assert.Throws <ArgumentException>(() => AmplitudeRatio.FromDecibelVolts(double.NegativeInfinity));
 }
Exemplo n.º 6
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double?)"/>
 public static AmplitudeRatio?DecibelsUnloaded(this float?value) => AmplitudeRatio.FromDecibelsUnloaded(value);
Exemplo n.º 7
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(double)"/>
 public static AmplitudeRatio DecibelMillivolts(this long value) => AmplitudeRatio.FromDecibelMillivolts(value);
Exemplo n.º 8
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double?)"/>
 public static AmplitudeRatio?DecibelMicrovolts(this float?value) => AmplitudeRatio.FromDecibelMicrovolts(value);
Exemplo n.º 9
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double)"/>
 public static AmplitudeRatio DecibelMicrovolts(this decimal value) => AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value));
Exemplo n.º 10
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(double)"/>
 public static AmplitudeRatio DecibelVolts(this float value) => AmplitudeRatio.FromDecibelVolts(value);
Exemplo n.º 11
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double)"/>
 public static AmplitudeRatio DecibelMicrovolts(this double value) => AmplitudeRatio.FromDecibelMicrovolts(value);
Exemplo n.º 12
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(double?)"/>
 public static AmplitudeRatio?DecibelVolts(this long?value) => AmplitudeRatio.FromDecibelVolts(value);
Exemplo n.º 13
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double?)"/>
 public static AmplitudeRatio?DecibelsUnloaded(this decimal?value) => AmplitudeRatio.FromDecibelsUnloaded(value == null ? (double?)null : Convert.ToDouble(value.Value));
Exemplo n.º 14
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double)"/>
 public static AmplitudeRatio DecibelsUnloaded(this decimal value) => AmplitudeRatio.FromDecibelsUnloaded(Convert.ToDouble(value));
Exemplo n.º 15
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.False(decibelvolt.Equals(new object()));
        }
Exemplo n.º 16
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(double?)"/>
 public static AmplitudeRatio?DecibelMicrovolts(this decimal?value) => AmplitudeRatio.FromDecibelMicrovolts(value == null ? (double?)null : Convert.ToDouble(value.Value));
Exemplo n.º 17
0
        public void EqualsReturnsFalseOnNull()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.False(decibelvolt.Equals(null));
        }
Exemplo n.º 18
0
 /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(double)"/>
 public static AmplitudeRatio DecibelsUnloaded(this double value) => AmplitudeRatio.FromDecibelsUnloaded(value);