use of com.sldeditor.common.tree.leaf.SLDTreeLeafPoint in project sldeditor by robward-scisys.
the class SLDTreeLeafPointTest method testGetSymbolizer.
/**
* Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#getSymbolizer()}.
*/
@Test
public void testGetSymbolizer() {
SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
assertEquals(PointSymbolizerImpl.class, leaf.getSymbolizer());
}
use of com.sldeditor.common.tree.leaf.SLDTreeLeafPoint in project sldeditor by robward-scisys.
the class SLDTreeLeafPointTest method testGetFill.
/**
* Test method for
* {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#getFill(org.opengis.style.Symbolizer)}.
*/
@Test
public void testGetFill() {
SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
assertNull(leaf.getFill(null));
assertNull(leaf.getFill(DefaultSymbols.createDefaultPolygonSymbolizer()));
PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
Fill expectedFill = null;
Graphic graphic = pointSymbolizer.getGraphic();
if (graphic != null) {
List<GraphicalSymbol> symbolList = graphic.graphicalSymbols();
if ((symbolList != null) && !symbolList.isEmpty()) {
GraphicalSymbol obj = symbolList.get(0);
if (obj != null) {
if (obj instanceof MarkImpl) {
MarkImpl mark = (MarkImpl) obj;
expectedFill = mark.getFill();
}
}
}
}
assertEquals(expectedFill, leaf.getFill(pointSymbolizer));
}
use of com.sldeditor.common.tree.leaf.SLDTreeLeafPoint in project sldeditor by robward-scisys.
the class SLDTreeLeafPointTest method testCreateFill.
/**
* Test method for
* {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#createFill(org.opengis.style.Symbolizer)}.
*/
@Test
public void testCreateFill() {
SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
pointSymbolizer.setGraphic(null);
leaf.createFill(pointSymbolizer);
assertTrue(pointSymbolizer.getGraphic() != null);
}
use of com.sldeditor.common.tree.leaf.SLDTreeLeafPoint in project sldeditor by robward-scisys.
the class SLDTreeLeafPointTest method testRemoveFill.
/**
* Test method for
* {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#removeFill(org.opengis.style.Symbolizer)}.
*/
@Test
public void testRemoveFill() {
SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
leaf.removeFill(pointSymbolizer);
assertNull(pointSymbolizer.getGraphic());
}
Aggregations