25 references to new
System.Drawing.Common.Tests (25)
System\Drawing\Drawing2D\ColorBlendTests.cs (3)
11
ColorBlend blend =
new
();
41
ColorBlend blend =
new
() { Colors = null };
51
ColorBlend blend =
new
() { Positions = null };
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (13)
259
ColorBlend blend =
new
()
376
ColorBlend blend =
new
()
392
InterpolationColors = new
ColorBlend
398
ColorBlend blend =
new
()
419
Assert.Throws<NullReferenceException>(() => brush.InterpolationColors = new
ColorBlend
{ Colors = null });
430
() => brush.InterpolationColors = new
ColorBlend
{ Colors = new Color[colorsLength] });
437
Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new
ColorBlend
{ Colors = new Color[2], Positions = null });
447
AssertExtensions.Throws<ArgumentException>("value", () => brush.InterpolationColors = new
ColorBlend
460
AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new
ColorBlend
472
InterpolationColors = new
ColorBlend
481
AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new
ColorBlend
493
InterpolationColors = new
ColorBlend
512
InterpolationColors = new
ColorBlend
System\Drawing\Drawing2D\PathGradientBrushTests.cs (9)
533
brush.InterpolationColors = new
ColorBlend
() { Colors = expectedColors, Positions = expectedPositions };
537
brush.InterpolationColors = new
ColorBlend
() { Colors = sameColors, Positions = expectedPositions };
583
brush.InterpolationColors = new
ColorBlend
() { Colors = null, Positions = null });
586
brush.InterpolationColors = new
ColorBlend
() { Colors = null, Positions = new float[2] });
594
brush.InterpolationColors = new
ColorBlend
() { Colors = new Color[1], Positions = null });
601
AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new
ColorBlend
());
609
brush.InterpolationColors = new
ColorBlend
() { Colors = [], Positions = [] });
617
brush.InterpolationColors = new
ColorBlend
() { Colors = new Color[1], Positions = new float[2] });
625
brush.InterpolationColors = new
ColorBlend
() { Colors = new Color[2], Positions = new float[1] });