use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testResetData.
@Test
public void testResetData() {
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.resetData();
assertNull(symbolData.getSymbolizer());
assertNull(symbolData.getFeatureTypeStyle());
assertNull(symbolData.getStyle());
assertNull(symbolData.getStyledLayer());
assertNull(symbolData.getRule());
assertEquals(-1, symbolData.getSelectedFTSIndex());
assertEquals(-1, symbolData.getSelectedRuleIndex());
assertEquals(-1, symbolData.getSelectedStyledLayerIndex());
assertEquals(-1, symbolData.getSelectedStyleIndex());
assertEquals(-1, symbolData.getSelectedSymbolizerIndex());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSelectedFTSIndex.
@Test
public void testSelectedFTSIndex() {
SymbolData symbolData = new SymbolData();
assertEquals(-1, symbolData.getSelectedFTSIndex());
symbolData.initialiseSelectedFTSIndex();
assertEquals(0, symbolData.getSelectedFTSIndex());
symbolData.incrementSelectedFTSIndex();
symbolData.incrementSelectedFTSIndex();
assertEquals(2, symbolData.getSelectedFTSIndex());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSetRule.
@Test
public void testSetRule() {
SymbolData symbolData = new SymbolData();
Rule rule = DefaultSymbols.createNewRule();
symbolData.setRule(rule);
assertEquals(rule, symbolData.getRule());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSelectedSymbolizerIndex.
@Test
public void testSelectedSymbolizerIndex() {
SymbolData symbolData = new SymbolData();
assertEquals(-1, symbolData.getSelectedSymbolizerIndex());
symbolData.initialiseSelectedSymbolizerIndex();
assertEquals(0, symbolData.getSelectedSymbolizerIndex());
symbolData.incrementSelectedSymbolizerIndex();
symbolData.incrementSelectedSymbolizerIndex();
assertEquals(2, symbolData.getSelectedSymbolizerIndex());
}
use of com.sldeditor.common.data.SymbolData in project sldeditor by robward-scisys.
the class SymbolDataTest method testSetFeatureTypeStyle.
@Test
public void testSetFeatureTypeStyle() {
SymbolData symbolData = new SymbolData();
FeatureTypeStyle fts = DefaultSymbols.createNewFeatureTypeStyle();
symbolData.setFeatureTypeStyle(fts);
assertEquals(fts, symbolData.getFeatureTypeStyle());
}
Aggregations