Exemplo 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)));
        }
Exemplo n.º 2
0
        public void EqualsIsImplemented()
        {
            SpecificWeight v = SpecificWeight.FromNewtonsPerCubicMeter(1);

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

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

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