21 references to new
System.Drawing.Common.Tests (21)
System\Drawing\Drawing2D\BlendTests.cs (3)
11
Blend blend =
new
();
41
Blend blend =
new
() { Factors = null };
51
Blend blend =
new
() { Positions = null };
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (8)
283
Blend blend =
new
()
302
Blend blend =
new
()
321
Assert.Throws<ArgumentNullException>(() => brush.Blend = new
Blend
{ Factors = null });
328
AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new
Blend
{ Factors = new float[2], Positions = null });
335
AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = new
Blend
{ Factors = new float[2], Positions = new float[1] });
342
AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new
Blend
{ Factors = [], Positions = [] });
352
AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new
Blend
());
522
brush.Blend = new
Blend
System\Drawing\Drawing2D\PathGradientBrushTests.cs (10)
259
brush.Blend = new
Blend
{ Factors = factors, Positions = positions };
299
yield return new object[] { new
Blend
() { Factors = [], Positions = [] } };
300
yield return new object[] { new
Blend
() { Factors = new float[2], Positions = [1, 1] } };
301
yield return new object[] { new
Blend
() { Factors = new float[2], Positions = [0, 5] } };
302
yield return new object[] { new
Blend
() { Factors = new float[3], Positions = [0, 1, 5] } };
303
yield return new object[] { new
Blend
() { Factors = new float[3], Positions = [1, 1, 1] } };
317
Blend invalidBlend =
new
() { Factors = new float[2], Positions = new float[1] };
328
Assert.Throws<ArgumentNullException>(() => brush.Blend = new
Blend
() { Factors = null, Positions = null });
329
Assert.Throws<ArgumentNullException>(() => brush.Blend = new
Blend
() { Factors = null, Positions = [] });
337
brush.Blend = new
Blend
() { Factors = [], Positions = null });