Esempio n. 1
0
        public void EqualsIsImplemented()
        {
            AreaDensity v = AreaDensity.FromKilogramsPerSquareMeter(1);

            Assert.True(v.Equals(AreaDensity.FromKilogramsPerSquareMeter(1), AreaDensity.FromKilogramsPerSquareMeter(KilogramsPerSquareMeterTolerance)));
            Assert.False(v.Equals(AreaDensity.Zero, AreaDensity.FromKilogramsPerSquareMeter(KilogramsPerSquareMeterTolerance)));
        }
Esempio n. 2
0
        public void EqualsReturnsFalseOnNull()
        {
            AreaDensity kilogrampersquaremeter = AreaDensity.FromKilogramsPerSquareMeter(1);

            Assert.False(kilogrampersquaremeter.Equals(null));
        }
Esempio n. 3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            AreaDensity kilogrampersquaremeter = AreaDensity.FromKilogramsPerSquareMeter(1);

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