Ejemplo n.º 1
0
        public void RelationMetaDataCollection_EqualityCheck()
        {
            // Arrange
            var item1a = new RelationMetaDatum("blah", "1");
            var item2a = new RelationMetaDatum("blah", "2");
            var item3a = new RelationMetaDatum("blah", "3");

            var item1b = new RelationMetaDatum("blah", "1");
            var item2b = new RelationMetaDatum("blah", "2");
            var item3b = new RelationMetaDatum("blah", "3");

            var coll1 = new RelationMetaDataCollection();
            var coll2 = new RelationMetaDataCollection();
            var coll3 = new RelationMetaDataCollection()
            {
                item1a, item2a, item3a
            };
            var coll4 = new RelationMetaDataCollection()
            {
                item2b, item1b, item3b
            };

            // Assert
            Assert.IsTrue(coll1.Equals(coll2));
            Assert.IsTrue(coll3.Equals(coll4));
            Assert.IsFalse(coll1.Equals(coll3));
        }
        public void RelationMetaDataCollection_EqualityCheck()
        {
            // Arrange
            var item1a = new RelationMetaDatum("blah", "1");
            var item2a = new RelationMetaDatum("blah", "2");
            var item3a = new RelationMetaDatum("blah", "3");

            var item1b = new RelationMetaDatum("blah", "1");
            var item2b = new RelationMetaDatum("blah", "2");
            var item3b = new RelationMetaDatum("blah", "3");

            var coll1 = new RelationMetaDataCollection();
            var coll2 = new RelationMetaDataCollection();
            var coll3 = new RelationMetaDataCollection() { item1a, item2a, item3a };
            var coll4 = new RelationMetaDataCollection() { item2b, item1b, item3b };

            // Assert
            Assert.IsTrue(coll1.Equals(coll2));
            Assert.IsTrue(coll3.Equals(coll4));
            Assert.IsFalse(coll1.Equals(coll3));
        }