use of com.sldeditor.ui.tree.item.FillTreeItem in project sldeditor by robward-scisys.
the class FillTreeItemTest method testGetTreeString.
/**
* Test method for {@link com.sldeditor.ui.tree.item.FillTreeItem#getTreeString(java.lang.Object)}.
*/
@Test
public void testGetTreeString() {
FillTreeItem item = new FillTreeItem();
String actualValue = item.getTreeString(null, null);
String expectedValue = Localisation.getString(SLDTreeTools.class, "TreeItem.fill");
assertTrue(actualValue.compareTo(expectedValue) == 0);
Fill fill = DefaultSymbols.createDefaultGraphicFill();
actualValue = item.getTreeString(null, fill);
assertTrue(actualValue.compareTo(expectedValue) == 0);
actualValue = item.getTreeString(null, fill);
assertTrue(actualValue.compareTo(expectedValue) == 0);
}
use of com.sldeditor.ui.tree.item.FillTreeItem in project sldeditor by robward-scisys.
the class FillTreeItemTest method testItemSelected.
/**
* Test method for {@link com.sldeditor.ui.tree.item.FillTreeItem#itemSelected(javax.swing.tree.DefaultMutableTreeNode, java.lang.Object)}.
*/
@Test
public void testItemSelected() {
FillTreeItem item = new FillTreeItem();
item.itemSelected(null, null);
Symbolizer symbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
DefaultMutableTreeNode parentNode = new DefaultMutableTreeNode();
parentNode.setUserObject(symbolizer);
DefaultMutableTreeNode node = new DefaultMutableTreeNode();
parentNode.add(node);
item.itemSelected(node, symbolizer);
// Get the code coverage stats up
item.itemSelected(parentNode, symbolizer);
parentNode.setUserObject(item);
item.itemSelected(node, null);
}
Aggregations