Search in sources :

Example 6 with SLDTreeLeafPolygon

use of com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testHasFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#hasFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testHasFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertFalse(leaf.hasFill(null));
    assertFalse(leaf.hasFill(DefaultSymbols.createDefaultPointSymbolizer()));
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    assertTrue(leaf.hasFill(polygonSymbolizer));
    polygonSymbolizer.setFill(null);
    assertFalse(leaf.hasFill(polygonSymbolizer));
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 7 with SLDTreeLeafPolygon

use of com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testCreateStroke.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#createStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testCreateStroke() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    polygonSymbolizer.setStroke(null);
    leaf.createStroke(polygonSymbolizer);
    assertTrue(polygonSymbolizer.getStroke() != null);
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 8 with SLDTreeLeafPolygon

use of com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testGetSymbolizer.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#getSymbolizer()}.
 */
@Test
public void testGetSymbolizer() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertEquals(PolygonSymbolizerImpl.class, leaf.getSymbolizer());
}
Also used : SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 9 with SLDTreeLeafPolygon

use of com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testGetFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#getFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testGetFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertNull(leaf.getFill(null));
    assertNull(leaf.getFill(DefaultSymbols.createDefaultPointSymbolizer()));
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    assertEquals(polygonSymbolizer.getFill(), leaf.getFill(polygonSymbolizer));
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Aggregations

SLDTreeLeafPolygon (com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon)9 Test (org.junit.Test)9 PolygonSymbolizer (org.geotools.styling.PolygonSymbolizer)8