System.CodeDom.Tests.CodeNamespaceImportCollectionTests.Item_InvalidIndex_ThrowsArgumentOutOfRangeException C# (CSharp) Méthode

Item_InvalidIndex_ThrowsArgumentOutOfRangeException() private méthode

private Item_InvalidIndex_ThrowsArgumentOutOfRangeException ( int index ) : void
index int
Résultat 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());
        }