Пример #1
0
        public void Copy_CreatesCopiesOfEachTier()
        {
            var copy = _collection.Copy();

            Assert.AreEqual(4, copy.Count);
            Assert.AreNotSame(copy, _collection);
            Assert.AreNotSame(copy[0], _collection[0]);
            Assert.AreNotSame(copy[1], _collection[1]);
            Assert.AreNotSame(copy[2], _collection[2]);
            Assert.AreNotSame(copy[3], _collection[3]);

            Assert.AreEqual(copy[0].DisplayName, _collection[0].DisplayName);
            Assert.AreEqual(copy[1].DisplayName, _collection[1].DisplayName);
            Assert.AreEqual(copy[2].DisplayName, _collection[2].DisplayName);
            Assert.AreEqual(copy[3].DisplayName, _collection[3].DisplayName);
        }