From: <svn...@os...> - 2012-04-21 22:28:02
|
Author: aaime Date: 2012-04-21 15:27:55 -0700 (Sat, 21 Apr 2012) New Revision: 38683 Modified: trunk/modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java Log: Test for GEOT-4109 Modified: trunk/modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java =================================================================== --- trunk/modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java 2012-04-21 08:23:12 UTC (rev 38682) +++ trunk/modules/library/main/src/test/java/org/geotools/styling/SLDTransformerTest.java 2012-04-21 22:27:55 UTC (rev 38683) @@ -776,6 +776,28 @@ assertEquals("parsed xml must contain attribbute type with correct value", -1, st.transform(cm).indexOf("type=")); } + @Test + public void testColorMapExtended() throws Exception { + SLDTransformer st = new SLDTransformer(); + ColorMap cm = sf.createColorMap(); + + // Test type = values, extended = true + cm.setType(ColorMap.TYPE_VALUES); + cm.setExtendedColors(true); + assertTrue("parsed xml must contain attribbute type with correct value", st.transform(cm).contains("extended=\"true\"")); + + // Test type = intervals, extended = true + cm.setType(ColorMap.TYPE_INTERVALS); + cm.setExtendedColors(true); + assertTrue("parsed xml must contain attribbute type with correct value", st.transform(cm).contains("extended=\"true\"")); + + // Test type = ramp, extended = true + cm.setType(ColorMap.TYPE_RAMP); + cm.setExtendedColors(true); + assertTrue("parsed xml must contain attribbute type with correct value", st.transform(cm).contains("extended=\"true\"")); + + } + /** * Checks the output of encoding a default line symbolizer does not include all the default values * @throws Exception |