4 writes to LinearColors
System.Drawing.Common.Tests (4)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (4)
535
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) {
LinearColors
= colors };
543
Assert.Throws<NullReferenceException>(() => brush.
LinearColors
= null);
552
Assert.Throws<IndexOutOfRangeException>(() => brush.
LinearColors
= new Color[length]);
562
AssertExtensions.Throws<ArgumentException>(null, () => brush.
LinearColors
= [Color.Red, Color.Wheat]);
12 references to LinearColors
System.Drawing.Common.Tests (12)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (12)
30
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
57
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
91
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
108
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
134
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
151
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
177
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
194
Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.
LinearColors
);
241
Assert.Equal(brush.
LinearColors
, clone.
LinearColors
);
536
Assert.Equal(colors.Take(2).Select(c => Color.FromArgb(c.ToArgb())), brush.
LinearColors
);
561
AssertExtensions.Throws<ArgumentException>(null, () => brush.
LinearColors
);