1 write to _icon
System.Drawing.Common.Tests (1)
System\Drawing\IconConverterTests.cs (1)
21
_icon
= new Icon(Path.Combine("bitmaps", "TestIcon.ico"));
31 references to _icon
System.Drawing.Common.Tests (31)
System\Drawing\IconConverterTests.cs (31)
22
_iconStr =
_icon
.ToString();
26
_icon
.Save(destStream);
31
_icoConvFrmTD = (IconConverter)TypeDescriptor.GetConverter(
_icon
);
109
Assert.Equal(
_icon
.Height, newIcon.Height);
110
Assert.Equal(
_icon
.Width, newIcon.Width);
121
Assert.Equal(
_icon
.Height, newIcon.Height);
122
Assert.Equal(
_icon
.Width, newIcon.Width);
135
Assert.Equal(_iconStr, (string)_icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(string)));
136
Assert.Equal(_iconStr, (string)_icoConv.ConvertTo(
_icon
, typeof(string)));
138
byte[] newIconBytes = (byte[])_icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, _iconBytes.GetType());
141
newIconBytes = (byte[])_icoConv.ConvertTo(
_icon
, _iconBytes.GetType());
144
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Rectangle)));
145
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
,
_icon
.GetType()));
146
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Size)));
147
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Point)));
148
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Metafile)));
149
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(object)));
150
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(int)));
152
Assert.Equal(_iconStr, (string)_icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(string)));
153
Assert.Equal(_iconStr, (string)_icoConvFrmTD.ConvertTo(
_icon
, typeof(string)));
155
newIconBytes = (byte[])_icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, _iconBytes.GetType());
158
newIconBytes = (byte[])_icoConvFrmTD.ConvertTo(
_icon
, _iconBytes.GetType());
161
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Rectangle)));
162
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
,
_icon
.GetType()));
163
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Size)));
164
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Point)));
165
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(Metafile)));
166
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(object)));
167
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_icon
, typeof(int)));