示例#1
0
        public void Should_FailEqualityForDifferentNumericValues()
        {
            var numericItem  = new I4(1);
            var numericItem2 = new I4(-2);

            Assert.IsFalse(numericItem.Equals(numericItem2));
        }
示例#2
0
        public void Should_FailEqualityForDifferentDataTypes()
        {
            var numericItem  = new I4(1);
            var numericItem2 = new U1(1);

            Assert.IsFalse(numericItem.Equals(numericItem2));
        }
示例#3
0
        public void Should_FailEqualityForDifferetObjectTypes()
        {
            var numericItem = new I4(1);
            var obj         = "test";

            Assert.IsFalse(numericItem.Equals(obj));
        }
示例#4
0
        public void Should_BeEqualIfNumericItemsEqual()
        {
            var numericItem  = new I4(1);
            var numericItem2 = new I4(1);

            Assert.IsTrue(numericItem.Equals(numericItem2));
        }
示例#5
0
        public void Should_FailEqualityForNull()
        {
            var numericItem = new I4(1);

            Assert.IsFalse(numericItem.Equals(null));
        }