public void ClonePerformanceTest() { var colorBlend = new ColorBlend(new[] { Color.Black, Color.White }, new[] { 0.0f, 1.0f }); var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend, colorBlend, colorBlend, 5) { NoDataValues = new List<double> { -9999 } }; TestHelper.AssertIsFasterThan(30,() => gradientTheme.Clone()); }
public void CloneGradientThemeWithNoDataValues() { var colorBlend = new ColorBlend(new[]{Color.Black, Color.White}, new[]{0.0f,1.0f}); var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend, colorBlend, colorBlend) {NoDataValues = new List<double>{-9999}}; var gradientThemeClone = gradientTheme.Clone(); Assert.AreEqual(gradientTheme.NoDataValues, ((GradientTheme)gradientThemeClone).NoDataValues); }
public void CloneGradientThemeWithNoDataValues() { var colorBlend = new ColorBlend(new[]{Color.Black, Color.White}, new[]{0.0f,1.0f}); var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend, colorBlend, colorBlend,5) {NoDataValues = new List<double>{-9999}}; var gradientThemeClone = (GradientTheme)gradientTheme.Clone(); Assert.AreEqual(gradientTheme.NoDataValues, (gradientThemeClone).NoDataValues); Assert.AreEqual(5,gradientThemeClone.NumberOfClasses); Assert.AreEqual(2,gradientThemeClone.FillColorBlend.Colors.Length); }