Search in sources :

Example 6 with FieldConfigDSProperties

use of com.sldeditor.ui.detail.config.FieldConfigDSProperties in project sldeditor by robward-scisys.

the class FieldConfigDSPropertiesTest method testRevertToDefaultValue.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.FieldConfigDSProperties#revertToDefaultValue()}. Test method
 * for {@link com.sldeditor.ui.detail.config.FieldConfigDSProperties#addConfig(java.util.List)}. Test
 * method for
 * {@link com.sldeditor.ui.detail.config.FieldConfigDSProperties#setDefaultValue(java.lang.String)}.
 */
@Test
public void testRevertToDefaultValue() {
    boolean valueOnly = true;
    FieldConfigDSProperties field = new FieldConfigDSProperties(new FieldConfigCommonData(Integer.class, FieldIdEnum.NAME, "label", valueOnly));
    field.revertToDefaultValue();
    assertNull(field.getStringValue());
}
Also used : FieldConfigDSProperties(com.sldeditor.ui.detail.config.FieldConfigDSProperties) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Aggregations

FieldConfigCommonData (com.sldeditor.ui.detail.config.FieldConfigCommonData)6 FieldConfigDSProperties (com.sldeditor.ui.detail.config.FieldConfigDSProperties)6 Test (org.junit.Test)6 DataSourceInterface (com.sldeditor.datasource.DataSourceInterface)2 CreateDataSourceInterface (com.sldeditor.datasource.impl.CreateDataSourceInterface)2 UndoEvent (com.sldeditor.common.undo.UndoEvent)1 FieldConfigBase (com.sldeditor.ui.detail.config.FieldConfigBase)1