use of com.sldeditor.ui.tree.item.FeatureTypeStyleTreeItem in project sldeditor by robward-scisys.
the class FeatureTypeStyleTreeItemTest method testGetTreeString.
/**
* Test method for
* {@link com.sldeditor.ui.tree.item.FeatureTypeStyleTreeItem#getTreeString(java.lang.Object)}.
*/
@Test
public void testGetTreeString() {
FeatureTypeStyleTreeItem item = new FeatureTypeStyleTreeItem();
String actualValue = item.getTreeString(null, null);
String expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.featureTypeStyle"), "");
assertTrue(actualValue.compareTo(expectedValue) == 0);
FeatureTypeStyle fts = DefaultSymbols.createNewFeatureTypeStyle();
actualValue = item.getTreeString(null, fts);
// Default feature type style sets name = name!
expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.featureTypeStyle"), "name");
assertTrue(actualValue.compareTo(expectedValue) == 0);
fts.setName(null);
actualValue = item.getTreeString(null, fts);
// Default feature type style sets name = name!
expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.featureTypeStyle"), "");
assertTrue(actualValue.compareTo(expectedValue) == 0);
String expectedName = "test name";
fts.setName(expectedName);
actualValue = item.getTreeString(null, fts);
expectedValue = String.format("%s : %s", Localisation.getString(SLDTreeTools.class, "TreeItem.featureTypeStyle"), expectedName);
assertTrue(actualValue.compareTo(expectedValue) == 0);
}
use of com.sldeditor.ui.tree.item.FeatureTypeStyleTreeItem in project sldeditor by robward-scisys.
the class FeatureTypeStyleTreeItemTest method testItemSelected.
/**
* Test method for
* {@link com.sldeditor.ui.tree.item.FeatureTypeStyleTreeItem#itemSelected(javax.swing.tree.DefaultMutableTreeNode, java.lang.Object)}.
*/
@Test
public void testItemSelected() {
FeatureTypeStyleTreeItem item = new FeatureTypeStyleTreeItem();
item.itemSelected(null, null);
}
Aggregations