SymbolizerTypeAnalyzer extends ParametersAnalyzer { public boolean validateStroke(Stroke s){ if(s instanceof PenStroke){ return validateFill(((PenStroke)s).getFill()); } else { return false; } }  boolean validateFill(Fill f); boolean validateStroke(Stroke s); boolean validateStrokeAndFill(Stroke s, Fill f); boolean validateGraphic(Graphic g);  }
@Test public void testValidStroke() throws Exception { Style s = getStyle(COLOR_CATEGORIZE); AreaSymbolizer as = (AreaSymbolizer) s.getRules().get(0).getCompositeSymbolizer() .getSymbolizerList().get(0); SymbolizerTypeAnalyzer sta = new SymbolizerTypeAnalyzer(); assertTrue(sta.validateStroke(as.getStroke())); }
@Test public void testInvalidStroke() throws Exception { SymbolizerTypeAnalyzer sta = new SymbolizerTypeAnalyzer(); assertFalse(sta.validateStroke(new GraphicStroke())); }
@Test public void testInvalidStrokeBis() throws Exception { SymbolizerTypeAnalyzer sta = new SymbolizerTypeAnalyzer(); PenStroke s = new PenStroke(); s.setFill(new GraphicFill()); assertFalse(sta.validateStroke(s)); }