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

            Assert.True(v.Equals(ElectricConductivity.FromSiemensPerMeter(1), ElectricConductivity.FromSiemensPerMeter(SiemensPerMeterTolerance)));
            Assert.False(v.Equals(ElectricConductivity.Zero, ElectricConductivity.FromSiemensPerMeter(SiemensPerMeterTolerance)));
        }
        public void EqualsReturnsFalseOnNull()
        {
            ElectricConductivity siemenspermeter = ElectricConductivity.FromSiemensPerMeter(1);

            Assert.False(siemenspermeter.Equals(null));
        }
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            ElectricConductivity siemenspermeter = ElectricConductivity.FromSiemensPerMeter(1);

            Assert.False(siemenspermeter.Equals(new object()));
        }