use of org.kie.pmml.api.enums.ARRAY_TYPE in project drools by kiegroup.
the class KiePMMLSimpleSetPredicateTest method evaluationStringIn.
@Test
public void evaluationStringIn() {
ARRAY_TYPE arrayType = ARRAY_TYPE.STRING;
List<Object> values = getObjects(arrayType, 1);
KiePMMLSimpleSetPredicate kiePMMLSimpleSetPredicate = getKiePMMLSimpleSetPredicate(values, arrayType, IN_NOTIN.IN);
assertFalse(kiePMMLSimpleSetPredicate.evaluation("NOT"));
assertTrue(kiePMMLSimpleSetPredicate.evaluation(values.get(0)));
}
use of org.kie.pmml.api.enums.ARRAY_TYPE in project drools by kiegroup.
the class KiePMMLSimpleSetPredicateTest method evaluateStringIn.
@Test
public void evaluateStringIn() {
ARRAY_TYPE arrayType = ARRAY_TYPE.STRING;
List<Object> values = getObjects(arrayType, 4);
KiePMMLSimpleSetPredicate kiePMMLSimpleSetPredicate = getKiePMMLSimpleSetPredicate(values, arrayType, IN_NOTIN.IN);
Map<String, Object> inputData = new HashMap<>();
inputData.put("FAKE", "NOT");
assertFalse(kiePMMLSimpleSetPredicate.evaluate(inputData));
inputData.put(SIMPLE_SET_PREDICATE_NAME, "NOT");
assertFalse(kiePMMLSimpleSetPredicate.evaluate(inputData));
inputData.put(SIMPLE_SET_PREDICATE_NAME, values.get(0));
assertTrue(kiePMMLSimpleSetPredicate.evaluate(inputData));
}
Aggregations