1 write to _cell
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewLinkCellTests.cs (1)
13
public DataGridViewLinkCellTests() =>
_cell
= new();
152 references to _cell
System.Windows.Forms.Tests (152)
System\Windows\Forms\DataGridViewLinkCellTests.cs (152)
15
public void Dispose() =>
_cell
.Dispose();
28
_cell
.Should().BeOfType<DataGridViewLinkCell>();
29
_cell
.Should().BeAssignableTo<DataGridViewCell>();
36
dataGridView.Rows[0].Cells[0] =
_cell
;
38
_cell
.Selected = false;
39
_cell
.ActiveLinkColor.Should().Be(LinkUtilities.IEActiveLinkColor);
41
_cell
.Selected = true;
42
_cell
.ActiveLinkColor.Should().Be(SystemColors.HighlightText);
49
_cell
.ActiveLinkColor = color;
51
_cell
.ActiveLinkColor.Should().Be(color);
58
dataGridView.Rows[0].Cells[0] =
_cell
;
60
_cell
.Selected = false;
62
_cell
.ActiveLinkColor = Color.Blue;
63
_cell
.ActiveLinkColor.Should().Be(Color.Blue);
65
_cell
.Selected = true;
66
_cell
.ActiveLinkColor = Color.Blue;
68
_cell
.ActiveLinkColor.Should().Be(Color.Blue);
74
_cell
.ActiveLinkColorInternal = Color.Yellow;
76
_cell
.ActiveLinkColor.Should().Be(Color.Yellow);
81
_cell
.EditType.Should().BeNull();
93
_cell
.FormattedValueType.Should().Be(typeof(string));
97
_cell
.LinkBehavior.Should().Be(LinkBehavior.SystemDefault);
102
_cell
.LinkBehavior = LinkBehavior.HoverUnderline;
103
_cell
.LinkBehavior.Should().Be(LinkBehavior.HoverUnderline);
105
_cell
.LinkBehavior = LinkBehavior.NeverUnderline;
106
_cell
.LinkBehavior.Should().Be(LinkBehavior.NeverUnderline);
112
_cell
.LinkBehavior = LinkBehavior.SystemDefault;
113
_cell
.LinkBehavior.Should().Be(LinkBehavior.SystemDefault);
120
dataGridView.Rows[0].Cells[0] =
_cell
;
122
_cell
.Selected = false;
123
_cell
.LinkColor.Should().Be(LinkUtilities.IELinkColor);
125
_cell
.Selected = true;
126
_cell
.LinkColor.Should().Be(SystemColors.HighlightText);
133
_cell
.LinkColor = color;
135
_cell
.LinkColor.Should().Be(color);
141
_cell
.LinkColorInternal = Color.Brown;
143
_cell
.LinkColor.Should().Be(Color.Brown);
148
_cell
.LinkVisited.Should().BeFalse();
153
_cell
.LinkVisited = true;
154
_cell
.LinkVisited.Should().BeTrue();
156
_cell
.LinkVisited = false;
157
_cell
.LinkVisited.Should().BeFalse();
163
_cell
.LinkVisited = false;
164
_cell
.LinkVisited.Should().BeFalse();
169
_cell
.TrackVisitedState.Should().BeTrue();
174
_cell
.TrackVisitedState = false;
175
_cell
.TrackVisitedState.Should().BeFalse();
177
_cell
.TrackVisitedState = true;
178
_cell
.TrackVisitedState.Should().BeTrue();
184
_cell
.TrackVisitedState = true;
185
_cell
.TrackVisitedState.Should().BeTrue();
190
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
195
_cell
.UseColumnTextForLinkValue = true;
196
_cell
.UseColumnTextForLinkValue.Should().BeTrue();
198
_cell
.UseColumnTextForLinkValue = false;
199
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
205
_cell
.UseColumnTextForLinkValue = false;
206
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
212
_cell
.ToString().Should().Be("DataGridViewLinkCell { ColumnIndex=-1, RowIndex=-1 }");
215
dataGridView.Rows[0].Cells[0] =
_cell
;
224
_cell
.ActiveLinkColor = Color.Red;
225
_cell
.LinkBehavior = LinkBehavior.HoverUnderline;
226
_cell
.LinkColor = Color.Green;
227
_cell
.TrackVisitedState = false;
228
_cell
.VisitedLinkColor = Color.Blue;
229
_cell
.UseColumnTextForLinkValue = true;
230
_cell
.LinkVisited = true;
232
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
234
clonedLinkCell.Should().NotBeSameAs(
_cell
);
235
clonedLinkCell.ActiveLinkColor.Should().Be(
_cell
.ActiveLinkColor);
236
clonedLinkCell.LinkBehavior.Should().Be(
_cell
.LinkBehavior);
237
clonedLinkCell.LinkColor.Should().Be(
_cell
.LinkColor);
238
clonedLinkCell.TrackVisitedState.Should().Be(
_cell
.TrackVisitedState);
239
clonedLinkCell.VisitedLinkColor.Should().Be(
_cell
.VisitedLinkColor);
240
clonedLinkCell.UseColumnTextForLinkValue.Should().Be(
_cell
.UseColumnTextForLinkValue);
241
clonedLinkCell.LinkVisited.Should().Be(
_cell
.LinkVisited);
247
_cell
.LinkColor = Color.Pink;
248
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
251
clonedLinkCell.LinkColor.Should().Be(
_cell
.LinkColor);
257
_cell
.LinkColor = Color.Orange;
258
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
269
_cell
.GetContentBounds(0).Should().Be(Rectangle.Empty);
275
dataGridView.Rows[0].Cells[0] =
_cell
;
284
_cell
.GetContentBounds(0).Should().Be(Rectangle.Empty);
288
((Action)(() =>
_cell
.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>();
294
dataGridView.Rows[0].Cells[0] =
_cell
;
296
Action action = () =>
_cell
.GetErrorIconBounds(-1);
299
ReferenceEquals(
_cell
, dataGridView.Rows[0].Cells[0]).Should().BeTrue();
304
((Action)(() =>
_cell
.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>();
310
dataGridView.Rows[0].Cells[0] =
_cell
;
312
Rectangle result =
_cell
.GetErrorIconBounds(0);
321
dataGridView.Rows[0].Cells[0] =
_cell
;
323
string? errorText =
_cell
.TestAccessor().Dynamic.GetErrorText(0);
325
Rectangle result =
_cell
.GetErrorIconBounds(0);
337
dataGridView.Rows[0].Cells[0] =
_cell
;
339
_cell
.Value = testValue;
341
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
353
_cell
.UseColumnTextForLinkValue = true;
354
dataGridView.Rows[0].Cells[0] =
_cell
;
356
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
365
_cell
.UseColumnTextForLinkValue = true;
366
dataGridView.Rows[0].Cells[0] =
_cell
;
368
_cell
.Value = testValue;
370
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
382
_cell
.UseColumnTextForLinkValue = true;
383
dataGridView.Rows[0].Cells[0] =
_cell
;
386
_cell
.Value = testValue;
388
object? result =
_cell
.TestAccessor().Dynamic.GetValue(newRowIndex);
403
_cell
.TrackVisitedState = trackVisitedState;
404
_cell
.LinkVisited = linkVisited;
406
bool result =
_cell
.TestAccessor().Dynamic.KeyUpUnsharesRow(keyEvent, 0);
415
dataGridView.Rows[0].Cells[0] =
_cell
;
419
bool result =
_cell
.TestAccessor().Dynamic.MouseDownUnsharesRow(args);
428
dataGridView.Rows[0].Cells[0] =
_cell
;
432
bool result =
_cell
.TestAccessor().Dynamic.MouseDownUnsharesRow(args);
440
_cell
.TestAccessor().Dynamic.LinkState = LinkState.Hover;
445
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
453
_cell
.TestAccessor().Dynamic.LinkBehaviorInternal = LinkBehavior.AlwaysUnderline;
455
_cell
.LinkBehavior.Should().Be(LinkBehavior.AlwaysUnderline);
461
_cell
.TestAccessor().Dynamic.LinkState = LinkState.Hover;
466
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
477
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
485
_cell
.TrackVisitedState = false;
490
bool result =
_cell
.TestAccessor().Dynamic.MouseUpUnsharesRow(args);
498
_cell
.TrackVisitedState = false;
503
bool result =
_cell
.TestAccessor().Dynamic.MouseUpUnsharesRow(args);
513
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0)).Should().NotThrow();
521
dataGridView.Rows[0].Cells[0] =
_cell
;
522
_cell
.TrackVisitedState = true;
537
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
542
_cell
.LinkVisited.Should().BeTrue();
549
dataGridView.Rows[0].Cells[0] =
_cell
;
550
_cell
.TrackVisitedState = false;
565
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
570
_cell
.LinkVisited.Should().BeFalse();
577
dataGridView.Rows[0].Cells[0] =
_cell
;
584
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
597
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseDown(args)).Should().NotThrow();
602
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseLeave(0)).Should().NotThrow();
610
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseMove(args)).Should().NotThrow();
619
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseUp(args)).Should().NotThrow();
626
dataGridView.Rows[0].Cells[0] =
_cell
;
627
_cell
.TrackVisitedState = true;
628
_cell
.LinkVisited = false;
632
_cell
.TestAccessor().Dynamic.OnMouseUp(args);
634
_cell
.LinkVisited.Should().BeFalse();
641
dataGridView.Rows[0].Cells[0] =
_cell
;
642
_cell
.TrackVisitedState = false;
643
_cell
.LinkVisited = false;
647
_cell
.TestAccessor().Dynamic.OnMouseUp(args);
649
_cell
.LinkVisited.Should().BeFalse();
659
_cell
.TestAccessor().Dynamic.Paint(