예제 #1
0
        public void Should_FailEqualityForDifferentNumericValues()
        {
            var numericItem  = new I2(1);
            var numericItem2 = new I2(2);

            Assert.IsFalse(numericItem.Equals(numericItem2));
        }
예제 #2
0
        public void Should_FailEqualityForDifferentDataTypes()
        {
            var numericItem  = new I2(1);
            var numericItem2 = new I1(5);

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

            Assert.IsFalse(numericItem.Equals(obj));
        }
예제 #4
0
        public void Should_BeEqualIfNumericItemsEqual()
        {
            var numericItem  = new I2(1);
            var numericItem2 = new I2(1);

            Assert.IsTrue(numericItem.Equals(numericItem2));
        }
예제 #5
0
        public void Should_FailEqualityForNull()
        {
            var numericItem = new I2(1);

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