1 write to _toolStripPanelRowCollection
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollectionTests.cs (1)
16
_toolStripPanelRowCollection
= new(_toolStripPanel);
44 references to _toolStripPanelRowCollection
System.Windows.Forms.Tests (44)
System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollectionTests.cs (44)
37
using ToolStripPanel toolStripPanel =
_toolStripPanelRowCollection
.TestAccessor().Dynamic._owner;
56
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
60
_toolStripPanelRowCollection
.Count.Should().Be(2);
61
_toolStripPanelRowCollection
[0].Should().Be(rows[0]);
62
_toolStripPanelRowCollection
[1].Should().Be(rows[1]);
73
ToolStripPanelRow row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
78
_toolStripPanelRowCollection
.Count.Should().Be(1);
79
_toolStripPanelRowCollection
[0].Should().Be(row);
90
Action action = () =>
_toolStripPanelRowCollection
.Add(value: null!);
99
Action action = () =>
_toolStripPanelRowCollection
.AddRange(value: (ToolStripPanelRow[])null!);
108
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
112
_toolStripPanelRowCollection
.AddRange(new ToolStripPanelRowCollection(_toolStripPanel) { rows[0], rows[1] });
114
_toolStripPanelRowCollection
.Count.Should().Be(4);
115
_toolStripPanelRowCollection
[2].Should().Be(rows[0]);
116
_toolStripPanelRowCollection
[3].Should().Be(rows[1]);
127
Action action = () =>
_toolStripPanelRowCollection
.AddRange(value: (ToolStripPanelRowCollection)null!);
136
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
140
_toolStripPanelRowCollection
.Count.Should().Be(2);
142
_toolStripPanelRowCollection
.Clear();
144
_toolStripPanelRowCollection
.Count.Should().Be(0);
155
_toolStripPanelRowCollection
.Clear();
157
_toolStripPanelRowCollection
.Count.Should().Be(0);
163
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
168
_toolStripPanelRowCollection
.Remove(row);
170
_toolStripPanelRowCollection
.Count.Should().Be(0);
181
var row1 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
187
_toolStripPanelRowCollection
.Remove(row2);
189
_toolStripPanelRowCollection
.Count.Should().Be(1);
190
_toolStripPanelRowCollection
[0].Should().Be(row1);
201
var row1 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
202
var row2 = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
207
_toolStripPanelRowCollection
.RemoveAt(0);
209
_toolStripPanelRowCollection
.Count.Should().Be(1);
210
_toolStripPanelRowCollection
[0].Should().Be(row2);
221
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
226
Action action = () =>
_toolStripPanelRowCollection
.RemoveAt(1);
240
Action action = () =>
_toolStripPanelRowCollection
.RemoveAt(0);
249
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
254
_toolStripPanelRowCollection
.CopyTo(array: array, index: 0);
268
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: null!, index: 0);
277
var row = AddRowToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel);
283
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: array, index: 1);
297
var rows = AddRowsToCollection(collection:
_toolStripPanelRowCollection
, panel: _toolStripPanel, count: 2);
302
Action action = () =>
_toolStripPanelRowCollection
.CopyTo(array: array, index: 0);