Exemple #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)));
        }
Exemple #2
0
        public void EqualsReturnsFalseOnNull()
        {
            AreaDensity kilogrampersquaremeter = AreaDensity.FromKilogramsPerSquareMeter(1);

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

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