public void Insert_ValidDirectoryAttribute_Success()
        {
            var attribute1 = new DirectoryAttributeModification {
                "value1"
            };
            var attribute2 = new DirectoryAttributeModification {
                "value2"
            };
            var collection = new DirectoryAttributeModificationCollection();

            collection.Insert(0, attribute1);
            collection.Insert(1, attribute2);

            Assert.Equal(new DirectoryAttributeModification[] { attribute1, attribute2 }, collection.Cast <DirectoryAttributeModification>());
        }
        public void Insert_NullValue_ThrowsArgumentException()
        {
            var collection = new DirectoryAttributeModificationCollection();

            AssertExtensions.Throws <ArgumentException>(null, () => collection.Insert(0, null));
        }