use of com.sldeditor.ui.detail.config.colourmap.FieldConfigColourMap in project sldeditor by robward-scisys.
the class FieldConfigColourMapTest method testCreateCopy.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.colourmap.FieldConfigColourMap#createCopy(com.sldeditor.ui.detail.config.FieldConfigBase)}.
*/
@Test
public void testCreateCopy() {
class TestFieldConfigColourMap extends FieldConfigColourMap {
public TestFieldConfigColourMap(FieldConfigCommonData commonData) {
super(commonData);
}
public FieldConfigPopulate callCreateCopy(FieldConfigBase fieldConfigBase) {
return createCopy(fieldConfigBase);
}
}
TestFieldConfigColourMap field = new TestFieldConfigColourMap(new FieldConfigCommonData(Geometry.class, FieldIdEnum.NAME, "label", true));
FieldConfigColourMap copy = (FieldConfigColourMap) field.callCreateCopy(null);
assertNull(copy);
copy = (FieldConfigColourMap) field.callCreateCopy(field);
assertEquals(field.getFieldId(), copy.getFieldId());
assertTrue(field.getLabel().compareTo(copy.getLabel()) == 0);
assertEquals(field.isValueOnly(), copy.isValueOnly());
}
Aggregations