Skip to content

Commit 2861bf2

Browse files
committed
Updated!
1 parent 7c8c2a1 commit 2861bf2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/unit/System.Windows.Forms/System/Windows/Forms/ToolStripContainer.ToolStripContainerTypedControlCollectionTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private static ToolStripContainer.ToolStripContainerTypedControlCollection Creat
1111
[WinFormsFact]
1212
public void Add_NullValue_DoesNothing()
1313
{
14-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(false);
14+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(isReadOnly: false);
1515

1616
collection.Add(null);
1717

@@ -21,7 +21,7 @@ public void Add_NullValue_DoesNothing()
2121
[WinFormsFact]
2222
public void Add_WhenReadOnly_ThrowsNotSupportedException()
2323
{
24-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(true);
24+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(isReadOnly: true);
2525
using ToolStripPanel panel = new();
2626

2727
Action act = () => collection.Add(panel);
@@ -32,7 +32,7 @@ public void Add_WhenReadOnly_ThrowsNotSupportedException()
3232
[WinFormsFact]
3333
public void Add_InvalidType_ThrowsArgumentException()
3434
{
35-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(false);
35+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(isReadOnly: false);
3636
using Button button = new();
3737

3838
Action act = () => collection.Add(button);
@@ -67,7 +67,7 @@ public void Add_ValidType_AddsSuccessfully(Type type)
6767
public void Remove_WhenReadOnly_ThrowsNotSupportedException(Type type)
6868
{
6969
using ToolStripContainer container = new();
70-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, true);
70+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, isReadOnly: true);
7171
using Control control = (Control)Activator.CreateInstance(type)!;
7272
container.ContentPanel.Controls.Add(control);
7373

@@ -79,7 +79,7 @@ public void Remove_WhenReadOnly_ThrowsNotSupportedException(Type type)
7979
[WinFormsFact]
8080
public void Remove_Panel_WhenNotReadOnly_RemovesPanel()
8181
{
82-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(false);
82+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = CreateCollection(isReadOnly: false);
8383
using ToolStripPanel panel = new();
8484
collection.Add(panel);
8585

@@ -92,7 +92,7 @@ public void Remove_Panel_WhenNotReadOnly_RemovesPanel()
9292
public void Remove_NonPanelOrContentPanel_DoesNotThrow()
9393
{
9494
using ToolStripContainer container = new();
95-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, false);
95+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, isReadOnly: false);
9696
using Button button = new();
9797
container.ContentPanel.Controls.Add(button);
9898

@@ -108,7 +108,7 @@ public void Remove_NonPanelOrContentPanel_DoesNotThrow()
108108
public void SetChildIndexInternal_WhenReadOnly_ThrowsNotSupportedException(Type type)
109109
{
110110
using ToolStripContainer container = new();
111-
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, true);
111+
ToolStripContainer.ToolStripContainerTypedControlCollection collection = new(container, isReadOnly: true);
112112
using Control control = (Control)Activator.CreateInstance(type)!;
113113
container.ContentPanel.Controls.Add(control);
114114

0 commit comments

Comments
 (0)