use of com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker in project sldeditor by robward-scisys.
the class FieldConfigMarkerTest method testSetEnabled.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#internal_setEnabled(boolean)}.
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#isEnabled()}.
*/
@Test
public void testSetEnabled() {
// Value only, no attribute/expression dropdown
boolean valueOnly = true;
FieldConfigMarker field = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
// Text field will not have been created
boolean expectedValue = true;
field.internal_setEnabled(expectedValue);
assertFalse(field.isEnabled());
// Create text field
field.createUI();
assertFalse(field.isEnabled());
expectedValue = false;
field.internal_setEnabled(expectedValue);
assertFalse(field.isEnabled());
// Has attribute/expression dropdown
valueOnly = false;
FieldConfigMarker field2 = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
// Text field will not have been created
expectedValue = true;
field2.internal_setEnabled(expectedValue);
assertFalse(field2.isEnabled());
// Create text field
field2.createUI();
assertFalse(field2.isEnabled());
expectedValue = false;
field2.internal_setEnabled(expectedValue);
assertFalse(field2.isEnabled());
}
use of com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker in project sldeditor by robward-scisys.
the class FieldConfigMarkerTest method testSetVisible.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#setVisible(boolean)}.
*/
@Test
public void testSetVisible() {
boolean valueOnly = true;
FieldConfigMarker field = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
boolean expectedValue = true;
field.setVisible(expectedValue);
field.createUI();
expectedValue = false;
field.setVisible(expectedValue);
}
use of com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker in project sldeditor by robward-scisys.
the class FieldConfigMarkerTest method testSetUpdateSymbolListener.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#setUpdateSymbolListener(com.sldeditor.ui.iface.UpdateSymbolInterface)}.
*/
@Test
public void testSetUpdateSymbolListener() {
boolean valueOnly = true;
FieldConfigMarker field = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
field.setUpdateSymbolListener(null);
}
use of com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker in project sldeditor by robward-scisys.
the class FieldConfigMarkerTest method testRevertToDefaultValue.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#revertToDefaultValue()}.
*/
@Test
public void testRevertToDefaultValue() {
boolean valueOnly = true;
FieldConfigMarker field = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
field.revertToDefaultValue();
// Does nothing
}
use of com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker in project sldeditor by robward-scisys.
the class FieldConfigMarkerTest method testGetSymbolClass.
/**
* Test method for
* {@link com.sldeditor.ui.detail.config.symboltype.FieldConfigMarker#getSymbolClass()}.
*/
@Test
public void testGetSymbolClass() {
boolean valueOnly = true;
FieldConfigMarker field = new FieldConfigMarker(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
assertEquals(MarkImpl.class, field.getSymbolClass());
}
Aggregations