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

            Assert.True(v.Equals(ElectricCurrentDensity.FromAmperesPerSquareMeter(1), ElectricCurrentDensity.FromAmperesPerSquareMeter(AmperesPerSquareMeterTolerance)));
            Assert.False(v.Equals(ElectricCurrentDensity.Zero, ElectricCurrentDensity.FromAmperesPerSquareMeter(AmperesPerSquareMeterTolerance)));
        }
Пример #2
0
        public void EqualsReturnsFalseOnNull()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

            Assert.False(amperepersquaremeter.Equals(null));
        }
Пример #3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

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