Exemplo n.º 1
0
        public void EqualsIsImplemented()
        {
            ElectricConductance v = ElectricConductance.FromSiemens(1);

            Assert.True(v.Equals(ElectricConductance.FromSiemens(1), ElectricConductance.FromSiemens(SiemensTolerance)));
            Assert.False(v.Equals(ElectricConductance.Zero, ElectricConductance.FromSiemens(SiemensTolerance)));
        }
Exemplo n.º 2
0
        public void EqualsReturnsFalseOnNull()
        {
            ElectricConductance siemens = ElectricConductance.FromSiemens(1);

            Assert.False(siemens.Equals(null));
        }
Exemplo n.º 3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            ElectricConductance siemens = ElectricConductance.FromSiemens(1);

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