Ejemplo n.º 1
0
        public void EqualsIsImplemented()
        {
            SpecificVolume v = SpecificVolume.FromCubicMetersPerKilogram(1);

            Assert.True(v.Equals(SpecificVolume.FromCubicMetersPerKilogram(1), SpecificVolume.FromCubicMetersPerKilogram(CubicMetersPerKilogramTolerance)));
            Assert.False(v.Equals(SpecificVolume.Zero, SpecificVolume.FromCubicMetersPerKilogram(CubicMetersPerKilogramTolerance)));
        }
        public void EqualsReturnsFalseOnNull()
        {
            SpecificVolume cubicmeterperkilogram = SpecificVolume.FromCubicMetersPerKilogram(1);

            Assert.False(cubicmeterperkilogram.Equals(null));
        }
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            SpecificVolume cubicmeterperkilogram = SpecificVolume.FromCubicMetersPerKilogram(1);

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