System.CodeDom.Tests.CodeNamespaceImportCollectionTests.Item_InvalidIndex_ThrowsArgumentOutOfRangeException C# (CSharp) Method

Item_InvalidIndex_ThrowsArgumentOutOfRangeException() private method

private Item_InvalidIndex_ThrowsArgumentOutOfRangeException ( int index ) : void
index int
return void
        public void Item_InvalidIndex_ThrowsArgumentOutOfRangeException(int index)
        {
            var collection = new CodeNamespaceCollection();
            Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index]);
            Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new CodeNamespace());
        }