use of com.sldeditor.ui.tree.item.UserLayerTreeItem in project sldeditor by robward-scisys.
the class UserLayerTreeItemTest method testItemSelected.
/**
* Test method for
* {@link com.sldeditor.ui.tree.item.UserLayerTreeItem#itemSelected(javax.swing.tree.DefaultMutableTreeNode, java.lang.Object)}.
*/
@Test
public void testItemSelected() {
UserLayerTreeItem item = new UserLayerTreeItem();
item.itemSelected(null, null);
}
use of com.sldeditor.ui.tree.item.UserLayerTreeItem in project sldeditor by robward-scisys.
the class UserLayerTreeItemTest method testGetTreeString.
/**
* Test method for
* {@link com.sldeditor.ui.tree.item.UserLayerTreeItem#getTreeString(java.lang.Object)}.
*/
@Test
public void testGetTreeString() {
UserLayerTreeItem item = new UserLayerTreeItem();
String actualValue = item.getTreeString(null, null);
String expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.userlayer"), "");
assertTrue(actualValue.compareTo(expectedValue) == 0);
UserLayer userLayer = DefaultSymbols.createNewUserLayer();
actualValue = item.getTreeString(null, userLayer);
assertTrue(actualValue.compareTo(expectedValue) == 0);
String expectedName = "test name";
userLayer.setName(expectedName);
actualValue = item.getTreeString(null, userLayer);
expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.userlayer"), expectedName);
assertTrue(actualValue.compareTo(expectedValue) == 0);
}
Aggregations