Exemple #1
0
        public void EqualsIsImplemented()
        {
            VitaminA v = VitaminA.FromInternationalUnits(1);

            Assert.IsTrue(v.Equals(VitaminA.FromInternationalUnits(1)));
            Assert.IsFalse(v.Equals(VitaminA.Zero));
        }
        public void EqualsIsImplemented()
        {
            VitaminA v = VitaminA.FromInternationalUnits(1);

            Assert.True(v.Equals(VitaminA.FromInternationalUnits(1), VitaminA.FromInternationalUnits(InternationalUnitsTolerance)));
            Assert.False(v.Equals(VitaminA.Zero, VitaminA.FromInternationalUnits(InternationalUnitsTolerance)));
        }
Exemple #3
0
        public void EqualsReturnsFalseOnNull()
        {
            VitaminA internationalunit = VitaminA.FromInternationalUnits(1);

            Assert.IsFalse(internationalunit.Equals(null));
        }
Exemple #4
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            VitaminA internationalunit = VitaminA.FromInternationalUnits(1);

            Assert.IsFalse(internationalunit.Equals(new object()));
        }