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

VerifyThatSameItemCannotBeAddedTwiceBis() private method

private VerifyThatSameItemCannotBeAddedTwiceBis ( ) : void
return void
        public void VerifyThatSameItemCannotBeAddedTwiceBis()
        {
            var list = new OrderedItemList<Thing>(this.person, true);
            var email_0 = new EmailAddress(Guid.NewGuid(), null, null);
            var email_1 = new EmailAddress(Guid.NewGuid(), null, null);

            list.Add(email_0);
            list.Add(email_1);

            Assert.Throws<InvalidOperationException>(() => list[0] = email_1);
        }