@@ -153,14 +153,10 @@ public void GetSortedActionItems_ReturnsCorrectItems_WhenDockNotFilled()
153
153
{
154
154
DesignerActionItemCollection items = _actionList . GetSortedActionItems ( ) ;
155
155
List < string > displayNames = items . Cast < DesignerActionItem > ( )
156
- . Select ( i => i . DisplayName ?? string . Empty )
157
- . ToList ( ) ;
156
+ . Select ( i => i . DisplayName ?? string . Empty )
157
+ . ToList ( ) ;
158
158
159
- displayNames . Should ( ) . ContainSingle ( name => name == "Top" ) ;
160
- displayNames . Should ( ) . ContainSingle ( name => name == "Bottom" ) ;
161
- displayNames . Should ( ) . ContainSingle ( name => name == "Left" ) ;
162
- displayNames . Should ( ) . ContainSingle ( name => name == "Right" ) ;
163
- displayNames . Should ( ) . ContainSingle ( name => name == "Dock Fill in Form" ) ;
159
+ displayNames . Should ( ) . Contain ( new [ ] { SR . ToolStripContainerActionList_Top , SR . ToolStripContainerActionList_Bottom , SR . ToolStripContainerActionList_Left , SR . ToolStripContainerActionList_Right , SR . DesignerShortcutDockInForm } ) ;
164
160
}
165
161
166
162
[ Fact ]
@@ -171,14 +167,10 @@ public void GetSortedActionItems_ReturnsCorrectItems_WhenDockFilled()
171
167
172
168
DesignerActionItemCollection items = _actionList . GetSortedActionItems ( ) ;
173
169
List < string > displayNames = items . Cast < DesignerActionItem > ( )
174
- . Select ( i => i . DisplayName ?? string . Empty )
175
- . ToList ( ) ;
170
+ . Select ( i => i . DisplayName ?? string . Empty )
171
+ . ToList ( ) ;
176
172
177
- displayNames . Should ( ) . ContainSingle ( name => name == "Top" ) ;
178
- displayNames . Should ( ) . ContainSingle ( name => name == "Bottom" ) ;
179
- displayNames . Should ( ) . ContainSingle ( name => name == "Left" ) ;
180
- displayNames . Should ( ) . ContainSingle ( name => name == "Right" ) ;
181
- displayNames . Should ( ) . NotContain ( name => name == "Dock in Form" ) ;
173
+ displayNames . Should ( ) . Contain ( new [ ] { SR . ToolStripContainerActionList_Top , SR . ToolStripContainerActionList_Bottom , SR . ToolStripContainerActionList_Left , SR . ToolStripContainerActionList_Right } ) ;
182
174
}
183
175
184
176
[ Fact ]
@@ -194,13 +186,9 @@ public void GetSortedActionItems_ReturnsCorrectItems_WhenProvideReparent()
194
186
195
187
DesignerActionItemCollection items = _actionList . GetSortedActionItems ( ) ;
196
188
List < string > displayNames = items . Cast < DesignerActionItem > ( )
197
- . Select ( i => i . DisplayName ?? string . Empty )
198
- . ToList ( ) ;
199
-
200
- displayNames . Should ( ) . ContainSingle ( name => name == "Top" ) ;
201
- displayNames . Should ( ) . ContainSingle ( name => name == "Bottom" ) ;
202
- displayNames . Should ( ) . ContainSingle ( name => name == "Left" ) ;
203
- displayNames . Should ( ) . ContainSingle ( name => name == "Right" ) ;
204
- displayNames . Should ( ) . ContainSingle ( name => name == "Re-parent Controls" ) ;
189
+ . Select ( i => i . DisplayName ?? string . Empty )
190
+ . ToList ( ) ;
191
+
192
+ displayNames . Should ( ) . Contain ( new [ ] { SR . ToolStripContainerActionList_Top , SR . ToolStripContainerActionList_Bottom , SR . ToolStripContainerActionList_Left , SR . ToolStripContainerActionList_Right , SR . DesignerShortcutReparentControls } ) ;
205
193
}
206
194
}
0 commit comments