Пример #1
0
        public void EqualsIsImplemented()
        {
            AmplitudeRatio v = AmplitudeRatio.FromDecibelVolts(1);

            Assert.True(v.Equals(AmplitudeRatio.FromDecibelVolts(1), AmplitudeRatio.FromDecibelVolts(DecibelVoltsTolerance)));
            Assert.False(v.Equals(AmplitudeRatio.Zero, AmplitudeRatio.FromDecibelVolts(DecibelVoltsTolerance)));
        }
Пример #2
0
        public void EqualsReturnsFalseOnNull()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.IsFalse(decibelvolt.Equals(null));
        }
Пример #3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            AmplitudeRatio decibelvolt = AmplitudeRatio.FromDecibelVolts(1);

            Assert.IsFalse(decibelvolt.Equals(new object()));
        }