Beispiel #1
0
        public void AliasToEntityMapAndDistinctRootEntityInequality()
        {
            var transf1 = new AliasToEntityMapResultTransformer();
            var transf2 = new DistinctRootEntityResultTransformer();

            Assert.IsFalse(transf1.Equals(transf2));
            Assert.IsFalse(transf2.Equals(transf1));
        }
Beispiel #2
0
        public void AliasToEntityMapEquality()
        {
            var transf1 = new AliasToEntityMapResultTransformer();
            var transf2 = new AliasToEntityMapResultTransformer();

            Assert.IsTrue(transf1.Equals(transf2));
            Assert.IsTrue(transf2.Equals(transf1));
        }
        public void AliasToEntityMapEquality()
        {
            var transf1 = new AliasToEntityMapResultTransformer();
            var transf2 = new AliasToEntityMapResultTransformer();
            HashSet <IResultTransformer> set = new HashSet <IResultTransformer>()
            {
                transf1, transf2,
            };

            Assert.That(set.Count, Is.EqualTo(1));
            Assert.IsTrue(transf1.Equals(transf2));
            Assert.IsTrue(transf2.Equals(transf1));
        }
        public void AliasToEntityMapAndDistinctRootEntityInequality()
        {
            var transf1 = new AliasToEntityMapResultTransformer();
            var transf2 = new CustomAliasToEntityMapResultTransformer();
            HashSet <IResultTransformer> set = new HashSet <IResultTransformer>()
            {
                transf1, transf2,
            };

            Assert.That(transf1.GetHashCode(), Is.EqualTo(transf2.GetHashCode()), "prerequisite");
            Assert.That(set.Count, Is.EqualTo(2));
            Assert.IsFalse(transf1.Equals(transf2));
            Assert.IsFalse(transf2.Equals(transf1));
        }