10 writes to InterpolationColors
System.Drawing.Common.Tests (10)
System\Drawing\Drawing2D\PathGradientBrushTests.cs (10)
533brush.InterpolationColors = new ColorBlend() { Colors = expectedColors, Positions = expectedPositions }; 537brush.InterpolationColors = new ColorBlend() { Colors = sameColors, Positions = expectedPositions }; 575Assert.Throws<ArgumentNullException>(() => brush.InterpolationColors = null); 583brush.InterpolationColors = new ColorBlend() { Colors = null, Positions = null }); 586brush.InterpolationColors = new ColorBlend() { Colors = null, Positions = new float[2] }); 594brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = null }); 601AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend()); 609brush.InterpolationColors = new ColorBlend() { Colors = [], Positions = [] }); 617brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = new float[2] }); 625brush.InterpolationColors = new ColorBlend() { Colors = new Color[2], Positions = new float[1] });
18 references to InterpolationColors
System.Drawing.Common.Tests (18)
System\Drawing\Drawing2D\PathGradientBrushTests.cs (18)
534Assert.Equal(expectedColors, brush.InterpolationColors.Colors); 535Assert.Equal(expectedPositions, brush.InterpolationColors.Positions); 538Assert.Equal(sameColors, brush.InterpolationColors.Colors); 539Assert.Equal(expectedPositions, brush.InterpolationColors.Positions); 549brush.InterpolationColors.Colors.ToList().AddRange(colors); 550Assert.Equal(defaultColors, brush.InterpolationColors.Colors); 551brush.InterpolationColors.Colors = colors; 552Assert.Equal(defaultColors, brush.InterpolationColors.Colors); 553brush.InterpolationColors.Colors[0] = Color.Pink; 554Assert.NotEqual(Color.Pink, brush.InterpolationColors.Colors[0]); 555Assert.Equal(defaultColors, brush.InterpolationColors.Colors); 556brush.InterpolationColors.Positions = []; 557Assert.Equal(1, brush.InterpolationColors.Positions.Length); 558brush.InterpolationColors.Positions = new float[2]; 559Assert.Equal(1, brush.InterpolationColors.Positions.Length); 568AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors); 946Assert.Equal(new Color[] { Color.Empty }, brush.InterpolationColors.Colors); 948Assert.Equal([0], brush.InterpolationColors.Positions);