Ejemplo n.º 1
0
        public void EqualsIsImplemented()
        {
            SpecificWeight v = SpecificWeight.FromNewtonsPerCubicMeter(1);

            Assert.True(v.Equals(SpecificWeight.FromNewtonsPerCubicMeter(1), SpecificWeight.FromNewtonsPerCubicMeter(NewtonsPerCubicMeterTolerance)));
            Assert.False(v.Equals(SpecificWeight.Zero, SpecificWeight.FromNewtonsPerCubicMeter(NewtonsPerCubicMeterTolerance)));
        }
Ejemplo n.º 2
0
        public void EqualsIsImplemented()
        {
            SpecificWeight v = SpecificWeight.FromNewtonsPerCubicMeter(1);

            Assert.IsTrue(v.Equals(SpecificWeight.FromNewtonsPerCubicMeter(1)));
            Assert.IsFalse(v.Equals(SpecificWeight.Zero));
        }
Ejemplo n.º 3
0
        public void EqualsReturnsFalseOnNull()
        {
            SpecificWeight newtonpercubicmeter = SpecificWeight.FromNewtonsPerCubicMeter(1);

            Assert.False(newtonpercubicmeter.Equals(null));
        }
Ejemplo n.º 4
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            SpecificWeight newtonpercubicmeter = SpecificWeight.FromNewtonsPerCubicMeter(1);

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