System\Drawing\BitmapTests.cs (6)
78AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename));
79AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, false));
80AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, true));
296AssertExtensions.Throws<ArgumentNullException>("g", null, () => new Bitmap(1, 1, null));
341AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, new Size(1, 2)));
342AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, 1, 2));
System\Drawing\Imaging\MetafileTests.cs (5)
90AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(path));
427AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc));
428AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly));
429AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description"));
858AssertExtensions.Throws<ArgumentException>("path", null, () => Metafile.GetMetafileHeader(fileName));