public void AddRange_ValidAttributes_AddsToCollection()
        {
            DirectoryAttributeModification[] attributes = new DirectoryAttributeModification[] { new DirectoryAttributeModification(), new DirectoryAttributeModification() };

            var collection = new DirectoryAttributeModificationCollection();

            collection.AddRange(attributes);

            Assert.Equal(attributes, collection.Cast <DirectoryAttributeModification>());
        }
        public void Add_ValidAttribute_AppendsToList()
        {
            var attribute1 = new DirectoryAttributeModification {
                "value1"
            };
            var attribute2 = new DirectoryAttributeModification {
                "value2"
            };
            var collection = new DirectoryAttributeModificationCollection {
                attribute1, attribute2
            };

            Assert.Equal(2, collection.Count);
            Assert.Equal(new DirectoryAttributeModification[] { attribute1, attribute2 }, collection.Cast <DirectoryAttributeModification>());
        }
        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>());
        }