1 write to _collection
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollectionTests.cs (1)
18_collection = new(_comboBoxCell);
89 references to _collection
System.Windows.Forms.Tests (89)
System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollectionTests.cs (89)
24_collection.Count.Should().Be(0); 26int index1 = _collection.Add("Item1"); 27int index2 = _collection.Add("Item2"); 28_collection.Count.Should().Be(2); 32_collection.Remove("Item1"); 33_collection.Count.Should().Be(1); 34_collection[0].Should().Be("Item2"); 36_collection.Add("Item1"); 37_collection.Remove("Item2"); 38_collection.Count.Should().Be(1); 39_collection[0].Should().Be("Item1"); 41_collection.Clear(); 42_collection.Count.Should().Be(0); 47_collection.IsReadOnly.Should().BeFalse(); 56_collection.Add(item1); 57int index = _collection.Add(item2); 60_collection.Count.Should().Be(2); 61_collection[0].Should().Be(item2); 62_collection[1].Should().Be(item1); 68Action action = () => _collection.Add(null!); 78_collection.AddRange(items); 80_collection.Count.Should().Be(3); 81_collection[0].Should().Be("Item1"); 82_collection[1].Should().Be("Item2"); 83_collection[2].Should().Be("Item3"); 92_collection.AddRange(items); 94_collection.Count.Should().Be(3); 95_collection[0].Should().Be("A"); 96_collection[1].Should().Be("B"); 97_collection[2].Should().Be("C"); 105_collection.AddRange(items); 107_collection.InnerArray.Count.Should().Be(3); 108_collection[0].Should().Be("Item1"); 109_collection[1].Should().Be("Item2"); 110_collection[2].Should().Be("Item3"); 118Action action = () => _collection.AddRange(items); 121_collection.Count.Should().Be(0); 129_collection.Add(item1); 130_collection.Add(item2); 132_collection[0].Should().Be(item1); 133_collection[1].Should().Be(item2); 141_collection.Add(item1); 143_collection[0] = item2; 145_collection[0].Should().Be(item2); 153Action action = () => _collection[index] = "Item"; 161_collection.Add("Item"); 163Action action = () => _collection[0] = null!; 173_collection.Add("Item1"); 174_collection.Add("Item2"); 176_collection.Clear(); 178_collection.Count.Should().Be(0); 187_collection.Add(item); 189_collection.Contains(item).Should().BeTrue(); 190_collection.Contains("NonExistentItem").Should().BeFalse(); 196Action action = () => _collection.Contains(null!); 205_collection.AddRange(items); 208_collection.CopyTo(destination, 0); 218Action actionNullDestination = () => _collection.CopyTo(null!, 0); 222Action actionNegativeIndex = () => _collection.CopyTo(destination, -1); 225Action actionOutOfRangeIndex = () => _collection.CopyTo(destination, 4); 233_collection.AddRange(items); 236Action action = () => _collection.CopyTo(destination, 0); 245_collection.AddRange(items); 247var enumerator = _collection.GetEnumerator(); 264_collection.Add(item1); 265_collection.Add(item2); 267_collection.IndexOf(item1).Should().Be(0); 268_collection.IndexOf(item2).Should().Be(1); 269_collection.IndexOf("NonExistentItem").Should().Be(-1); 275Action action = () => _collection.IndexOf(null!); 286_collection.Add(item1); 287_collection.Insert(0, item2); 291_collection[0].Should().Be(item2); 292_collection[1].Should().Be(item1); 296_collection[0].Should().Be(item2); 297_collection[1].Should().Be(item1); 307Action actionNegativeIndex = () => _collection.Insert(-1, "Item"); 308Action actionOutOfRangeIndex = () => _collection.Insert(1, "Item"); 309Action actionNullItem = () => _collection.Insert(0, null!); 321_collection.Add(item1); 323_collection.Remove(item2); 325_collection.Count.Should().Be(1); 326_collection[0].Should().Be(item1); 334_collection.Add(item1); 335_collection.Add(item2); 337_collection.RemoveAt(0); 339_collection.Count.Should().Be(1); 340_collection[0].Should().Be(item2); 348Action action = () => _collection.RemoveAt(index);