Search in sources :

Example 11 with SymbolData

use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.

the class SymbolDataTest method testSetSymbolizer.

@Test
public void testSetSymbolizer() {
    SymbolData symbolData = new SymbolData();
    LineSymbolizer symbolizer = DefaultSymbols.createDefaultLineSymbolizer();
    symbolData.setSymbolizer(symbolizer);
    assertEquals(symbolizer, symbolData.getSymbolizer());
}
Also used : SymbolData(com.sldeditor.common.data.SymbolData) LineSymbolizer(org.geotools.styling.LineSymbolizer) Test(org.junit.Test)

Example 12 with SymbolData

use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.

the class SymbolDataTest method testSelectedStyleIndex.

@Test
public void testSelectedStyleIndex() {
    SymbolData symbolData = new SymbolData();
    assertEquals(-1, symbolData.getSelectedStyleIndex());
    symbolData.initialiseSelectedStyleIndex();
    assertEquals(0, symbolData.getSelectedStyleIndex());
    symbolData.incrementSelectedStyleIndex();
    symbolData.incrementSelectedStyleIndex();
    assertEquals(2, symbolData.getSelectedStyleIndex());
}
Also used : SymbolData(com.sldeditor.common.data.SymbolData) Test(org.junit.Test)

Aggregations

SymbolData (com.sldeditor.common.data.SymbolData)12 Test (org.junit.Test)12 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)2 LineSymbolizer (org.geotools.styling.LineSymbolizer)1 NamedLayer (org.geotools.styling.NamedLayer)1 Rule (org.geotools.styling.Rule)1 Style (org.geotools.styling.Style)1