예제 #1
0
        public void CompareToThrowsOnNull()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

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

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

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

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