Beispiel #1
0
        public void ListViewGroupCollection_CopyTo_Empty_Nop()
        {
            using var listView = new ListView();
            ListViewGroupCollection collection = listView.Groups;
            var array = new object[] { 1, 2, 3 };

            collection.CopyTo(array, 0);
            Assert.Equal(new object[] { 1, 2, 3 }, array);
        }
Beispiel #2
0
        public void ListViewGroupCollection_CopyTo_NonEmpty_Success()
        {
            using var listView = new ListView();
            ListViewGroupCollection collection = listView.Groups;
            var group = new ListViewGroup();

            collection.Add(group);

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

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