KiePMMLOperatorValue { public String getConstraintsAsString() { return constraintsString; } KiePMMLOperatorValue(OPERATOR operator, Object value); OPERATOR getOperator(); Object getValue(); String getConstraintsAsString(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final String VALUE_CONSTRAINT_PATTERN; }
@Test public void getConstraintsAsString() { OPERATOR operator = OPERATOR.LESS_THAN; Object value = 234; KiePMMLOperatorValue kiePMMLOperatorValue = new KiePMMLOperatorValue(operator, value); String retrieved = kiePMMLOperatorValue.getConstraintsAsString(); String expected = String.format(VALUE_CONSTRAINT_PATTERN, operator.getOperator(), value); assertEquals(expected, retrieved); }