Exemplo n.º 1
0
        public void ListViewSubItemCollection_CopyTo_Empty_Nop()
        {
            var   item       = new ListViewItem();
            IList collection = new ListViewItem.ListViewSubItemCollection(item);
            var   array      = new object[] { 1, 2, 3 };

            collection.CopyTo(array, 0);
            Assert.Equal(new object[] { 1, 2, 3 }, array);
        }
Exemplo n.º 2
0
        public void ListViewSubItemCollection_CopyTo_NonEmpty_Success()
        {
            var   item       = new ListViewItem();
            IList collection = new ListViewItem.ListViewSubItemCollection(item);
            var   subItem    = new ListViewItem.ListViewSubItem();

            collection.Add(subItem);

            var array = new object[] { 1, 2, 3 };

            collection.CopyTo(array, 1);
            Assert.Equal(new object[] { 1, subItem, 3 }, array);
        }