Search in sources :

Example 1 with SLDTreeLeafPolygon

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

the class SLDTreeLeafPolygonTest method testCreateFill.

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

Example 2 with SLDTreeLeafPolygon

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

the class SLDTreeLeafPolygonTest method testRemoveStroke.

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

Example 3 with SLDTreeLeafPolygon

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

the class SLDTreeLeafPolygonTest method testHasStroke.

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

Example 4 with SLDTreeLeafPolygon

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

the class SLDTreeLeafPolygonTest method testGetStroke.

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

Example 5 with SLDTreeLeafPolygon

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

the class SLDTreeLeafPolygonTest method testRemoveFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#removeFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testRemoveFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    leaf.removeFill(polygonSymbolizer);
    assertNull(polygonSymbolizer.getFill());
}
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