コード例 #1
0
        public void ABCDCompare_ReturnsTrueWhenDerivedTypeIsDifferent()
        {
            var x   = new UnionABCD(1);
            var y   = new UnionABCDPrime(1);
            var sut = UnionABCD.Comparer;

            Assert.IsTrue(sut.Equals(x, y));
        }
コード例 #2
0
        public void ABCDCompare_ReturnsFalseWhenFourthUnderlyingTypeIsNotEqual()
        {
            var x   = new UnionABCD(new D());
            var y   = new UnionABCD(new D());
            var sut = UnionABCD.Comparer;

            Assert.IsFalse(sut.Equals(x, y));
        }
コード例 #3
0
        public void ABCDCompare_ReturnsFalseWhenUnderlyingTypeIsDifferent()
        {
            var x   = new UnionABCD(1);
            var y   = new UnionABCD(new B());
            var sut = UnionABCD.Comparer;

            Assert.IsFalse(sut.Equals(x, y));
        }
コード例 #4
0
        public void ABCDCompare_ReturnsTrueWhenFirstUnderlyingTypeIsEqual()
        {
            var x   = new UnionABCD(1);
            var y   = new UnionABCD(1);
            var sut = UnionABCD.Comparer;

            Assert.IsTrue(sut.Equals(x, y));
        }