use of com.sldeditor.common.xml.ui.GroupIdEnum in project sldeditor by robward-scisys.
the class GraphicPanelFieldManagerTest method testAddMultiOptionGroup.
/**
* Test method for {@link com.sldeditor.ui.detail.GraphicPanelFieldManager#addMultiOptionGroup(com.sldeditor.ui.detail.config.base.MultiOptionGroup)}.
* Test method for {@link com.sldeditor.ui.detail.GraphicPanelFieldManager#getMultiOptionGroup(java.lang.Class, com.sldeditor.common.xml.ui.GroupIdEnum)}.
*/
@Test
public void testAddMultiOptionGroup() {
Class<?> expectedPanelId = StrokeDetails.class;
GraphicPanelFieldManager mgr = new GraphicPanelFieldManager(expectedPanelId);
FieldIdEnum expectedFieldId = FieldIdEnum.NAME;
FieldConfigString stringField = new FieldConfigString(new FieldConfigCommonData(String.class, expectedFieldId, "test label", false), "button text");
mgr.addField(stringField);
MultiOptionGroup multiOption = new MultiOptionGroup();
GroupIdEnum expectedGroupId = GroupIdEnum.FILLSYMBOL;
multiOption.setId(expectedGroupId);
mgr.addMultiOptionGroup(multiOption);
MultiOptionGroup actualValue = mgr.getMultiOptionGroup(null, null);
assertNull(actualValue);
actualValue = mgr.getMultiOptionGroup(expectedPanelId, expectedGroupId);
assertEquals(multiOption, actualValue);
}
Aggregations