65 references to _column
System.Windows.Forms.Tests (65)
System\Windows\Forms\DataGridViewImageColumnTests.cs (65)
12
public void Dispose() =>
_column
.Dispose();
17
_column
.Description.Should().Be(string.Empty);
19
_column
.Description = "Test description";
20
_column
.Description.Should().Be("Test description");
22
_column
.Description = "";
23
_column
.Description.Should().Be(string.Empty);
29
_column
.CellTemplate = null;
30
Action action = () => { var _ =
_column
.Description; };
37
_column
.CellTemplate = null;
38
Action action = () =>
_column
.Description = "desc";
46
dataGridView.Columns.Add(
_column
);
49
_column
.Description = "desc1";
59
_column
.Description = "desc2";
74
dataGridView.Columns.Add(
_column
);
77
_column
.Description = "foo";
90
_column
.Description = "foo";
101
_column
.Icon.Should().BeNull();
104
_column
.Icon = icon;
105
_column
.Icon.Should().Be(icon);
107
_column
.Icon = null;
108
_column
.Icon.Should().BeNull();
114
_column
.Image.Should().BeNull();
117
_column
.Image = bmp;
118
_column
.Image.Should().Be(bmp);
120
_column
.Image = null;
121
_column
.Image.Should().BeNull();
126
_column
.ImageLayout.Should().Be(DataGridViewImageCellLayout.Normal);
131
using DataGridViewImageCell cellTemplate = (DataGridViewImageCell)
_column
.CellTemplate!;
134
_column
.ImageLayout.Should().Be(DataGridViewImageCellLayout.Stretch);
141
dataGridView.Columns.Add(
_column
);
144
_column
.ImageLayout = DataGridViewImageCellLayout.Zoom;
145
_column
.CellTemplate.Should().NotBeNull();
159
_column
.ValuesAreIcons.Should().BeFalse();
165
using DataGridViewImageCell cellTemplate = (DataGridViewImageCell)
_column
.CellTemplate!;
168
_column
.ValuesAreIcons.Should().Be(valueIsIcon);
175
dataGridView.Columns.Add(
_column
);
178
_column
.ValuesAreIcons = true;
179
_column
.CellTemplate.Should().NotBeNull();
180
((DataGridViewImageCell)
_column
.CellTemplate).ValueIsIcon.Should().BeTrue();
191
_column
.ValuesAreIcons = false;
192
_column
.CellTemplate.Should().NotBeNull();
209
dataGridView.Columns.Add(
_column
);
212
_column
.ImageLayout = DataGridViewImageCellLayout.Normal;
214
_column
.ImageLayout = DataGridViewImageCellLayout.Stretch;
227
_column
.ImageLayout = DataGridViewImageCellLayout.Stretch;
229
_column
.CellTemplate.Should().NotBeNull();
230
((DataGridViewImageCell)
_column
.CellTemplate).ImageLayout.Should().Be(DataGridViewImageCellLayout.Stretch);
242
_column
.Icon = icon;
243
_column
.Image = bmp;
244
_column
.Description = "desc";
245
_column
.ValuesAreIcons = true;
246
_column
.ImageLayout = DataGridViewImageCellLayout.Stretch;
248
DataGridViewImageColumn dataGridViewImageColumnclone = (DataGridViewImageColumn)
_column
.Clone();
250
dataGridViewImageColumnclone.Should().NotBeSameAs(
_column
);
251
dataGridViewImageColumnclone.Icon.Should().Be(
_column
.Icon);
252
dataGridViewImageColumnclone.Image.Should().Be(
_column
.Image);
253
dataGridViewImageColumnclone.Description.Should().Be(
_column
.Description);
254
dataGridViewImageColumnclone.ValuesAreIcons.Should().Be(
_column
.ValuesAreIcons);
255
dataGridViewImageColumnclone.ImageLayout.Should().Be(
_column
.ImageLayout);
256
dataGridViewImageColumnclone.DefaultCellStyle.Alignment.Should().Be(
_column
.DefaultCellStyle.Alignment);
273
_column
.Name = "MyImageColumn";
275
_column
.ToString().Should().Be("DataGridViewImageColumn { Name=MyImageColumn, Index=-1 }");
278
dataGridView.Columns.Add(
_column
);
280
_column
.ToString().Should().Be($"DataGridViewImageColumn {{ Name=MyImageColumn, Index={
_column
.Index} }}");