public void Ctor_ModifyAttributes_UpdatesInnerArray()
        {
            var attribute1 = new BrowsableAttribute(true);
            var attribute2 = new ReadOnlyAttribute(true);
            var attributes = new Attribute[] { attribute1 };
            var collection = new SubAttributeCollection(attributes);

            Assert.Equal(attributes, collection.Attributes);
            Assert.Equal(new Attribute[] { attribute1 }, collection.Cast <Attribute>());

            // Change.
            attributes[0] = attribute2;
            Assert.Equal(new Attribute[] { attribute2 }, collection.Cast <Attribute>());
        }
        public void Ctor_Attributes(Attribute[] attributes, Attribute[] expected)
        {
            var collection = new SubAttributeCollection(attributes);

            Assert.Equal(expected, collection.Attributes);
            Assert.Equal(expected.Length, collection.Count);
            Assert.Equal(expected, collection.Cast <Attribute>());
        }