public Bitmap(Image original, int width, int height) : this(width, height, PixelFormat.Format32bppArgb)
{
+ if (original == null)
+ throw new ArgumentNullException(nameof(original));
+
using (Graphics g = Graphics.FromImage(this))
{
g.Clear(Color.Transparent);
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Ctor_NullImageWithSize_ThrowsArgumentNullException()
{
- AssertExtensions.Throws<ArgumentNullException>("image", () => new Bitmap(null, new Size(1, 2)));
- AssertExtensions.Throws<ArgumentNullException>("image", () => new Bitmap(null, 1, 2));
+ AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, new Size(1, 2)));
+ AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, 1, 2));
}
[ConditionalFact(Helpers.IsDrawingSupported)]