31 references to Throws
System.Drawing.Common.Tests (31)
System\Drawing\BitmapTests.cs (3)
113
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("resource", null, () => new Bitmap(typeof(Bitmap), null));
146
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null));
147
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null, false));
System\Drawing\Drawing2D\GraphicsPathTests.cs (1)
1080
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("family", null, () =>
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (1)
326
AssertExtensions.
Throws
<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new Blend { Factors = new float[2], Positions = null });
System\Drawing\Drawing2D\PathGradientBrushTests.cs (3)
334
AssertExtensions.
Throws
<ArgumentException, ArgumentNullException>("value", "source", () =>
593
AssertExtensions.
Throws
<ArgumentException, ArgumentNullException>("value", "source", () =>
616
AssertExtensions.
Throws
<ArgumentException, ArgumentException>("value", null, () =>
System\Drawing\IconTests.cs (7)
145
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null));
146
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, 32, 32));
147
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, new Size(32, 32)));
245
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, 32, 32));
246
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, new Size(32, 32)));
275
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("resource", null, () => new Icon(typeof(Icon), null));
401
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon(null));
System\Drawing\ImageTests.cs (3)
562
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null));
563
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true));
564
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true, validateImageData: true));
System\Drawing\Imaging\MetafileTests.cs (5)
101
AssertExtensions.
Throws
<ArgumentNullException, ArgumentException>("stream", null, () => new Metafile((Stream)null));
695
AssertExtensions.
Throws
<ArgumentException, ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, _rectangleF));
696
AssertExtensions.
Throws
<ArgumentException, ArgumentException>("path", null, () =>
698
AssertExtensions.
Throws
<ArgumentException, ArgumentException>("path", null, () =>
700
AssertExtensions.
Throws
<ArgumentException, ArgumentException>("path", null, () =>
System\Drawing\Printing\MarginsTests.cs (8)
58
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("left", null, () => new Margins(-1, 2, 3, 4));
64
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("right", null, () => new Margins(1, -1, 3, 4));
70
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("top", null, () => new Margins(1, 2, -1, 4));
76
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("bottom", null, () => new Margins(1, 2, 3, -1));
178
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Left = -1);
200
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Right = -1);
222
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Top = -1);
244
AssertExtensions.
Throws
<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Bottom = -1);