use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSelectedStyledLayerIndex.
@Test
public void testSelectedStyledLayerIndex() {
SymbolData symbolData = new SymbolData();
assertEquals(-1, symbolData.getSelectedStyledLayerIndex());
symbolData.initialiseSelectedStyledLayerIndex();
assertEquals(0, symbolData.getSelectedStyledLayerIndex());
symbolData.incrementSelectedStyledLayerIndex();
symbolData.incrementSelectedStyledLayerIndex();
assertEquals(2, symbolData.getSelectedStyledLayerIndex());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSelectedRuleIndex.
@Test
public void testSelectedRuleIndex() {
SymbolData symbolData = new SymbolData();
assertEquals(-1, symbolData.getSelectedRuleIndex());
symbolData.initialiseSelectedRuleIndex();
assertEquals(0, symbolData.getSelectedRuleIndex());
symbolData.incrementSelectedRuleIndex();
symbolData.incrementSelectedRuleIndex();
assertEquals(2, symbolData.getSelectedRuleIndex());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSetStyledLayer.
@Test
public void testSetStyledLayer() {
SymbolData symbolData = new SymbolData();
NamedLayer namedLayer = DefaultSymbols.createNewNamedLayer();
symbolData.setStyledLayer(namedLayer);
assertEquals(namedLayer, symbolData.getStyledLayer());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSetStyle.
@Test
public void testSetStyle() {
SymbolData symbolData = new SymbolData();
Style style = DefaultSymbols.createNewStyle();
symbolData.setStyle(style);
assertEquals(style, symbolData.getStyle());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testUpdate.
@Test
public void testUpdate() {
SymbolData symbolData = new SymbolData();
symbolData.setSymbolizer(DefaultSymbols.createDefaultLineSymbolizer());
symbolData.setRule(DefaultSymbols.createNewRule());
symbolData.setStyle(DefaultSymbols.createNewStyle());
symbolData.setFeatureTypeStyle(DefaultSymbols.createNewFeatureTypeStyle());
symbolData.setStyledLayer(DefaultSymbols.createNewNamedLayer());
symbolData.initialiseSelectedSymbolizerIndex();
symbolData.initialiseSelectedFTSIndex();
symbolData.initialiseSelectedRuleIndex();
symbolData.initialiseSelectedStyledLayerIndex();
symbolData.initialiseSelectedStyleIndex();
SymbolData newSymbolData = new SymbolData();
newSymbolData.update(symbolData);
assertEquals(newSymbolData.getSymbolizer(), symbolData.getSymbolizer());
assertEquals(newSymbolData.getFeatureTypeStyle(), symbolData.getFeatureTypeStyle());
assertEquals(newSymbolData.getStyle(), symbolData.getStyle());
assertEquals(newSymbolData.getStyledLayer(), symbolData.getStyledLayer());
assertEquals(newSymbolData.getRule(), symbolData.getRule());
assertEquals(newSymbolData.getSelectedFTSIndex(), symbolData.getSelectedFTSIndex());
assertEquals(newSymbolData.getSelectedRuleIndex(), symbolData.getSelectedRuleIndex());
assertEquals(newSymbolData.getSelectedStyledLayerIndex(), symbolData.getSelectedStyledLayerIndex());
assertEquals(newSymbolData.getSelectedStyleIndex(), symbolData.getSelectedStyleIndex());
assertEquals(newSymbolData.getSelectedSymbolizerIndex(), symbolData.getSelectedSymbolizerIndex());
}
Aggregations