use of com.sldeditor.rendertransformation.types.JAIExtRangeValues in project sldeditor by robward-scisys.
the class JAIExtRangeValuesTest method testJAIExtRangeValues.
/**
* Test method for {@link
* com.sldeditor.rendertransformation.types.JAIExtRangeValues#JAIExtRangeValues()}.
*/
@Test
void testJAIExtRangeValues() {
JAIExtRangeValues testObj = new JAIExtRangeValues();
testObj.createInstance();
assertEquals(Arrays.asList(Range.class), testObj.getType());
Range range = RangeFactory.create(0.0, true, 50.0, true, false);
testObj.setDefaultValue(range);
assertNull(testObj.getExpression());
// Range value
testObj.setValue(range);
assertNull(testObj.getExpression());
// Literal expression
Expression expectedExpression = ff.literal(range);
testObj.setValue(expectedExpression);
assertEquals(expectedExpression, testObj.getExpression());
// Attribute expression
expectedExpression = ff.property("test");
testObj.setValue(expectedExpression);
assertEquals(expectedExpression, testObj.getExpression());
// Not set
testObj.setValue("");
assertNull(testObj.getExpression());
FieldConfigBase field = testObj.getField(new FieldConfigCommonData(JAIExtRangeValues.class, FieldIdEnum.INITIAL_GAP, "label", true, false, false));
assertEquals(FieldConfigRange.class, field.getClass());
// Increase code coverage
TestJAIExtRangeValues testObj2 = new TestJAIExtRangeValues();
testObj2.populateSymbolType(null);
}
Aggregations