1 write to _control
System.Windows.Forms.Tests (1)
System\Windows\Forms\DomainUpDownTests.cs (1)
19
_control
= new();
137 references to _control
System.Windows.Forms.Tests (137)
System\Windows\Forms\DomainUpDownTests.cs (137)
25
_control
.Items.Clear();
26
_control
.Dispose();
192
_control
.Padding = value;
194
_control
.Padding.Should().Be(expected);
195
_control
.IsHandleCreated.Should().BeFalse();
197
_control
.Padding = value;
198
_control
.Padding.Should().Be(expected);
199
_control
.IsHandleCreated.Should().BeFalse();
206
_control
.Handle.Should().NotBe(IntPtr.Zero);
208
_control
.Invalidated += (sender, e) => invalidatedCallCount++;
210
_control
.StyleChanged += (sender, e) => styleChangedCallCount++;
212
_control
.HandleCreated += (sender, e) => createdCallCount++;
214
_control
.Padding = value;
215
_control
.Padding.Should().Be(expected);
216
_control
.IsHandleCreated.Should().BeTrue();
221
_control
.Padding = value;
222
_control
.Padding.Should().Be(expected);
223
_control
.IsHandleCreated.Should().BeTrue();
235
sender.Should().Be(
_control
);
239
_control
.PaddingChanged += handler;
243
_control
.Padding = padding1;
244
_control
.Padding.Should().Be(padding1);
248
_control
.Padding = padding1;
249
_control
.Padding.Should().Be(padding1);
254
_control
.Padding = padding2;
255
_control
.Padding.Should().Be(padding2);
259
_control
.PaddingChanged -= handler;
260
_control
.Padding = padding1;
261
_control
.Padding.Should().Be(padding1);
362
_control
.Items.Add("Item1");
363
_control
.Items.Add("Item2");
369
sender.Should().Be(
_control
);
375
sender.Should().Be(
_control
);
380
_control
.TextChanged += textChangedHandler;
381
_control
.SelectedItemChanged += handler;
384
_control
.SelectedIndex = 0;
385
_control
.SelectedIndex.Should().Be(0);
390
_control
.SelectedIndex = 0;
391
_control
.SelectedIndex.Should().Be(0);
396
_control
.SelectedIndex = 1;
397
_control
.SelectedIndex.Should().Be(1);
402
_control
.SelectedIndex = -1;
403
_control
.SelectedIndex.Should().Be(-1);
408
_control
.TextChanged -= textChangedHandler;
409
_control
.SelectedItemChanged -= handler;
410
_control
.SelectedIndex = 0;
411
_control
.SelectedIndex.Should().Be(0);
422
_control
.Invoking(c => c.SelectedIndex = value).Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("value");
431
_control
.Items.Add("Item");
432
_control
.Invoking(c => c.SelectedIndex = value).Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("value");
554
_control
.Items.Add("Item1");
555
_control
.Items.Add("Item2");
561
sender.Should().Be(
_control
);
567
sender.Should().Be(
_control
);
572
_control
.TextChanged += textChangedHandler;
573
_control
.SelectedItemChanged += handler;
576
_control
.SelectedItem = "Item1";
577
_control
.SelectedItem.Should().Be("Item1");
582
_control
.SelectedItem = "Item1";
583
_control
.SelectedItem.Should().Be("Item1");
588
_control
.SelectedItem = "Item2";
589
_control
.SelectedItem.Should().Be("Item2");
594
_control
.SelectedItem = null;
595
_control
.SelectedItem.Should().BeNull();
600
_control
.TextChanged -= textChangedHandler;
601
_control
.SelectedItemChanged -= handler;
602
_control
.SelectedItem = "Item1";
603
_control
.SelectedItem.Should().Be("Item1");
884
_control
.Wrap = value;
886
_control
.Wrap.Should().Be(value);
887
_control
.IsHandleCreated.Should().BeFalse();
890
_control
.Wrap = value;
891
_control
.Wrap.Should().Be(value);
892
_control
.IsHandleCreated.Should().BeFalse();
895
_control
.Wrap = !value;
896
_control
.Wrap.Should().Be(!value);
897
_control
.IsHandleCreated.Should().BeFalse();
904
_control
.Handle.Should().NotBe(IntPtr.Zero);
906
_control
.Invalidated += (sender, e) => invalidatedCallCount++;
908
_control
.StyleChanged += (sender, e) => styleChangedCallCount++;
910
_control
.HandleCreated += (sender, e) => createdCallCount++;
912
_control
.Wrap = value;
913
_control
.Wrap.Should().Be(value);
914
_control
.IsHandleCreated.Should().BeTrue();
920
_control
.Wrap = value;
921
_control
.Wrap.Should().Be(value);
922
_control
.IsHandleCreated.Should().BeTrue();
928
_control
.Wrap = !value;
929
_control
.Wrap.Should().Be(!value);
930
_control
.IsHandleCreated.Should().BeTrue();
1116
_control
.Items.Add("foo1");
1117
_control
.Items.Add("foo2");
1118
_control
.Items.Add("foo3");
1119
_control
.Items.Add("Cowman");
1120
_control
.Items.Add("foo4");
1121
_control
.MatchIndex(text, false, start).Should().Be(expected);
1127
_control
.Items.Add("item1");
1128
Action act = () =>
_control
.MatchIndex(null, false, 0);
1355
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1357
_control
.SelectedIndex = initialIndex;
1358
_control
.Wrap = wrap;
1360
_control
.DownButton();
1362
_control
.SelectedIndex.Should().Be(expectedIndex);
1372
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1374
_control
.SelectedIndex = initialIndex;
1375
_control
.Wrap = wrap;
1377
_control
.DownButton();
1378
_control
.DownButton();
1380
_control
.SelectedIndex.Should().Be(expectedIndex);
1388
_control
.Items.Clear();
1389
_control
.Items.AddRange(items);
1390
_control
.SelectedIndex = selectedIndex;
1392
string s =
_control
.ToString();
1403
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1404
_control
.Text = text;
1405
_control
.UpButton();
1406
_control
.SelectedIndex.Should().Be(expectedIndex);
1412
_control
.Text = "NoSuchItem";
1413
_control
.UpButton();
1414
_control
.SelectedIndex.Should().Be(-1);
1420
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1421
_control
.SelectedIndex = 2;
1422
_control
.UpButton();
1423
_control
.SelectedIndex.Should().Be(1);
1429
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1430
_control
.SelectedIndex = 0;
1431
_control
.Wrap = false;
1432
_control
.UpButton();
1433
_control
.SelectedIndex.Should().Be(0);
1439
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1440
_control
.SelectedIndex = 0;
1441
_control
.Wrap = true;
1442
_control
.UpButton();
1443
_control
.SelectedIndex.Should().Be(2);
1449
_control
.Items.Clear();
1450
_control
.UpButton();
1451
_control
.SelectedIndex.Should().Be(-1);