CDP4Common.Tests.Types.OrderedItemListTestFixture.VerifyThatIfInsertAtIndexGreaterThatCountItemIsAppendedToList C# (CSharp) Method

VerifyThatIfInsertAtIndexGreaterThatCountItemIsAppendedToList() private method

        public void VerifyThatIfInsertAtIndexGreaterThatCountItemIsAppendedToList()
        {
            var list = new OrderedItemList<Thing>(this.person, false);
            var email1 = new EmailAddress(Guid.NewGuid(), null, null);
            list.Add(email1);

            var index = list.Count + 1;
            var email2 = new EmailAddress(Guid.NewGuid(), null, null);
            list.Insert(index, email2);

            Assert.AreSame(email1, list[0]);
            Assert.AreSame(email2, list[1]);
        }