1 write to _toolStripPanelRowCollection
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollectionTests.cs (1)
18
_toolStripPanelRowCollection
= new(_toolStripPanel);
44 references to _toolStripPanelRowCollection
System.Windows.Forms.Tests (44)
System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollectionTests.cs (44)
39
using ToolStripPanel toolStripPanel =
_toolStripPanelRowCollection
.TestAccessor().Dynamic._owner;
58
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
62
_toolStripPanelRowCollection
.Count.Should().Be(2);
63
_toolStripPanelRowCollection
[0].Should().Be(rows[0]);
64
_toolStripPanelRowCollection
[1].Should().Be(rows[1]);
75
ToolStripPanelRow row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
80
_toolStripPanelRowCollection
.Count.Should().Be(1);
81
_toolStripPanelRowCollection
[0].Should().Be(row);
92
Action action = () =>
_toolStripPanelRowCollection
.Add(value: null!);
101
Action action = () =>
_toolStripPanelRowCollection
.AddRange(value: (ToolStripPanelRow[])null!);
110
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
114
_toolStripPanelRowCollection
.AddRange(new ToolStripPanelRowCollection(_toolStripPanel) { rows[0], rows[1] });
116
_toolStripPanelRowCollection
.Count.Should().Be(4);
117
_toolStripPanelRowCollection
[2].Should().Be(rows[0]);
118
_toolStripPanelRowCollection
[3].Should().Be(rows[1]);
129
Action action = () =>
_toolStripPanelRowCollection
.AddRange(value: (ToolStripPanelRowCollection)null!);
138
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
142
_toolStripPanelRowCollection
.Count.Should().Be(2);
144
_toolStripPanelRowCollection
.Clear();
146
_toolStripPanelRowCollection
.Count.Should().Be(0);
157
_toolStripPanelRowCollection
.Clear();
159
_toolStripPanelRowCollection
.Count.Should().Be(0);
165
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
170
_toolStripPanelRowCollection
.Remove(row);
172
_toolStripPanelRowCollection
.Count.Should().Be(0);
183
var row1 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
189
_toolStripPanelRowCollection
.Remove(row2);
191
_toolStripPanelRowCollection
.Count.Should().Be(1);
192
_toolStripPanelRowCollection
[0].Should().Be(row1);
203
var row1 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
204
var row2 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
209
_toolStripPanelRowCollection
.RemoveAt(0);
211
_toolStripPanelRowCollection
.Count.Should().Be(1);
212
_toolStripPanelRowCollection
[0].Should().Be(row2);
223
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
228
Action action = () =>
_toolStripPanelRowCollection
.RemoveAt(1);
242
Action action = () =>
_toolStripPanelRowCollection
.RemoveAt(0);
251
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
256
_toolStripPanelRowCollection
.CopyTo(array: array, index: 0);
270
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: null!, index: 0);
279
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
285
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: array, index: 1);
299
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
304
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: array, index: 0);