Example #1
0
        public void EqualsIsImplemented()
        {
            MagneticField v = MagneticField.FromTeslas(1);

            Assert.True(v.Equals(MagneticField.FromTeslas(1), MagneticField.FromTeslas(TeslasTolerance)));
            Assert.False(v.Equals(MagneticField.Zero, MagneticField.FromTeslas(TeslasTolerance)));
        }
Example #2
0
        public void EqualsReturnsFalseOnNull()
        {
            MagneticField tesla = MagneticField.FromTeslas(1);

            Assert.False(tesla.Equals(null));
        }
Example #3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            MagneticField tesla = MagneticField.FromTeslas(1);

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