예제 #1
0
        public void Ctor_Collection_ContainsItems()
        {
            var expectedItems = new List <TestItem>
            {
                new TestItem(),
                new TestItem(),
                new TestItem()
            };
            var subject = new ChangeTrackingCollection <TestItem>(expectedItems);

            Assert.Equal(expectedItems.Count, subject.Count);
            Assert.Same(expectedItems[0], subject.ElementAt(0));
            Assert.Same(expectedItems[1], subject.ElementAt(1));
            Assert.Same(expectedItems[2], subject.ElementAt(2));
        }