1 write to _cell
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewLinkCellTests.cs (1)
12public DataGridViewLinkCellTests() => _cell = new();
152 references to _cell
System.Windows.Forms.Tests (152)
System\Windows\Forms\DataGridViewLinkCellTests.cs (152)
14public void Dispose() => _cell.Dispose(); 27_cell.Should().BeOfType<DataGridViewLinkCell>(); 28_cell.Should().BeAssignableTo<DataGridViewCell>(); 35dataGridView.Rows[0].Cells[0] = _cell; 37_cell.Selected = false; 38_cell.ActiveLinkColor.Should().Be(LinkUtilities.IEActiveLinkColor); 40_cell.Selected = true; 41_cell.ActiveLinkColor.Should().Be(SystemColors.HighlightText); 48_cell.ActiveLinkColor = color; 50_cell.ActiveLinkColor.Should().Be(color); 57dataGridView.Rows[0].Cells[0] = _cell; 59_cell.Selected = false; 61_cell.ActiveLinkColor = Color.Blue; 62_cell.ActiveLinkColor.Should().Be(Color.Blue); 64_cell.Selected = true; 65_cell.ActiveLinkColor = Color.Blue; 67_cell.ActiveLinkColor.Should().Be(Color.Blue); 73_cell.ActiveLinkColorInternal = Color.Yellow; 75_cell.ActiveLinkColor.Should().Be(Color.Yellow); 80_cell.EditType.Should().BeNull(); 92_cell.FormattedValueType.Should().Be(typeof(string)); 96_cell.LinkBehavior.Should().Be(LinkBehavior.SystemDefault); 101_cell.LinkBehavior = LinkBehavior.HoverUnderline; 102_cell.LinkBehavior.Should().Be(LinkBehavior.HoverUnderline); 104_cell.LinkBehavior = LinkBehavior.NeverUnderline; 105_cell.LinkBehavior.Should().Be(LinkBehavior.NeverUnderline); 111_cell.LinkBehavior = LinkBehavior.SystemDefault; 112_cell.LinkBehavior.Should().Be(LinkBehavior.SystemDefault); 119dataGridView.Rows[0].Cells[0] = _cell; 121_cell.Selected = false; 122_cell.LinkColor.Should().Be(LinkUtilities.IELinkColor); 124_cell.Selected = true; 125_cell.LinkColor.Should().Be(SystemColors.HighlightText); 132_cell.LinkColor = color; 134_cell.LinkColor.Should().Be(color); 140_cell.LinkColorInternal = Color.Brown; 142_cell.LinkColor.Should().Be(Color.Brown); 147_cell.LinkVisited.Should().BeFalse(); 152_cell.LinkVisited = true; 153_cell.LinkVisited.Should().BeTrue(); 155_cell.LinkVisited = false; 156_cell.LinkVisited.Should().BeFalse(); 162_cell.LinkVisited = false; 163_cell.LinkVisited.Should().BeFalse(); 168_cell.TrackVisitedState.Should().BeTrue(); 173_cell.TrackVisitedState = false; 174_cell.TrackVisitedState.Should().BeFalse(); 176_cell.TrackVisitedState = true; 177_cell.TrackVisitedState.Should().BeTrue(); 183_cell.TrackVisitedState = true; 184_cell.TrackVisitedState.Should().BeTrue(); 189_cell.UseColumnTextForLinkValue.Should().BeFalse(); 194_cell.UseColumnTextForLinkValue = true; 195_cell.UseColumnTextForLinkValue.Should().BeTrue(); 197_cell.UseColumnTextForLinkValue = false; 198_cell.UseColumnTextForLinkValue.Should().BeFalse(); 204_cell.UseColumnTextForLinkValue = false; 205_cell.UseColumnTextForLinkValue.Should().BeFalse(); 211_cell.ToString().Should().Be("DataGridViewLinkCell { ColumnIndex=-1, RowIndex=-1 }"); 214dataGridView.Rows[0].Cells[0] = _cell; 223_cell.ActiveLinkColor = Color.Red; 224_cell.LinkBehavior = LinkBehavior.HoverUnderline; 225_cell.LinkColor = Color.Green; 226_cell.TrackVisitedState = false; 227_cell.VisitedLinkColor = Color.Blue; 228_cell.UseColumnTextForLinkValue = true; 229_cell.LinkVisited = true; 231DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 233clonedLinkCell.Should().NotBeSameAs(_cell); 234clonedLinkCell.ActiveLinkColor.Should().Be(_cell.ActiveLinkColor); 235clonedLinkCell.LinkBehavior.Should().Be(_cell.LinkBehavior); 236clonedLinkCell.LinkColor.Should().Be(_cell.LinkColor); 237clonedLinkCell.TrackVisitedState.Should().Be(_cell.TrackVisitedState); 238clonedLinkCell.VisitedLinkColor.Should().Be(_cell.VisitedLinkColor); 239clonedLinkCell.UseColumnTextForLinkValue.Should().Be(_cell.UseColumnTextForLinkValue); 240clonedLinkCell.LinkVisited.Should().Be(_cell.LinkVisited); 246_cell.LinkColor = Color.Pink; 247DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 250clonedLinkCell.LinkColor.Should().Be(_cell.LinkColor); 256_cell.LinkColor = Color.Orange; 257DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 268_cell.GetContentBounds(0).Should().Be(Rectangle.Empty); 274dataGridView.Rows[0].Cells[0] = _cell; 283_cell.GetContentBounds(0).Should().Be(Rectangle.Empty); 287((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>(); 293dataGridView.Rows[0].Cells[0] = _cell; 295Action action = () => _cell.GetErrorIconBounds(-1); 298ReferenceEquals(_cell, dataGridView.Rows[0].Cells[0]).Should().BeTrue(); 303((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>(); 309dataGridView.Rows[0].Cells[0] = _cell; 311Rectangle result = _cell.GetErrorIconBounds(0); 320dataGridView.Rows[0].Cells[0] = _cell; 322string? errorText = _cell.TestAccessor().Dynamic.GetErrorText(0); 324Rectangle result = _cell.GetErrorIconBounds(0); 336dataGridView.Rows[0].Cells[0] = _cell; 338_cell.Value = testValue; 340object? result = _cell.TestAccessor().Dynamic.GetValue(0); 352_cell.UseColumnTextForLinkValue = true; 353dataGridView.Rows[0].Cells[0] = _cell; 355object? result = _cell.TestAccessor().Dynamic.GetValue(0); 364_cell.UseColumnTextForLinkValue = true; 365dataGridView.Rows[0].Cells[0] = _cell; 367_cell.Value = testValue; 369object? result = _cell.TestAccessor().Dynamic.GetValue(0); 381_cell.UseColumnTextForLinkValue = true; 382dataGridView.Rows[0].Cells[0] = _cell; 385_cell.Value = testValue; 387object? result = _cell.TestAccessor().Dynamic.GetValue(newRowIndex); 402_cell.TrackVisitedState = trackVisitedState; 403_cell.LinkVisited = linkVisited; 405bool result = _cell.TestAccessor().Dynamic.KeyUpUnsharesRow(keyEvent, 0); 414dataGridView.Rows[0].Cells[0] = _cell; 418bool result = _cell.TestAccessor().Dynamic.MouseDownUnsharesRow(args); 427dataGridView.Rows[0].Cells[0] = _cell; 431bool result = _cell.TestAccessor().Dynamic.MouseDownUnsharesRow(args); 439_cell.TestAccessor().Dynamic.LinkState = LinkState.Hover; 444bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 452_cell.TestAccessor().Dynamic.LinkBehaviorInternal = LinkBehavior.AlwaysUnderline; 454_cell.LinkBehavior.Should().Be(LinkBehavior.AlwaysUnderline); 460_cell.TestAccessor().Dynamic.LinkState = LinkState.Hover; 465bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 476bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 484_cell.TrackVisitedState = false; 489bool result = _cell.TestAccessor().Dynamic.MouseUpUnsharesRow(args); 497_cell.TrackVisitedState = false; 502bool result = _cell.TestAccessor().Dynamic.MouseUpUnsharesRow(args); 512_cell.Invoking(c => c.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0)).Should().NotThrow(); 520dataGridView.Rows[0].Cells[0] = _cell; 521_cell.TrackVisitedState = true; 536_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 541_cell.LinkVisited.Should().BeTrue(); 548dataGridView.Rows[0].Cells[0] = _cell; 549_cell.TrackVisitedState = false; 564_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 569_cell.LinkVisited.Should().BeFalse(); 576dataGridView.Rows[0].Cells[0] = _cell; 583_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 596_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseDown(args)).Should().NotThrow(); 601_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseLeave(0)).Should().NotThrow(); 609_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseMove(args)).Should().NotThrow(); 618_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseUp(args)).Should().NotThrow(); 625dataGridView.Rows[0].Cells[0] = _cell; 626_cell.TrackVisitedState = true; 627_cell.LinkVisited = false; 631_cell.TestAccessor().Dynamic.OnMouseUp(args); 633_cell.LinkVisited.Should().BeFalse(); 640dataGridView.Rows[0].Cells[0] = _cell; 641_cell.TrackVisitedState = false; 642_cell.LinkVisited = false; 646_cell.TestAccessor().Dynamic.OnMouseUp(args); 648_cell.LinkVisited.Should().BeFalse(); 658_cell.TestAccessor().Dynamic.Paint(