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

            Assert.IsTrue(v.Equals(VitaminA.FromInternationalUnits(1)));
            Assert.IsFalse(v.Equals(VitaminA.Zero));
        }
예제 #2
0
        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)));
        }
예제 #3
0
        public void EqualsReturnsFalseOnNull()
        {
            VitaminA internationalunit = VitaminA.FromInternationalUnits(1);

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

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