use of org.kie.pmml.evaluator.assembler.factories.PMMLRuleMappersFactory.KIE_PMML_RULE_MAPPERS_CLASS_NAME in project drools by kiegroup.
the class PMMLCompilerServiceTest method addPMMLRuleMappersHasSourceMap.
@Test
public void addPMMLRuleMappersHasSourceMap() {
KiePMMLTestingModelWithSources kiePmmlModel = new KiePMMLTestingModelWithSources("TEST", "kmodulePackageName", new HashMap<>());
assertTrue(kiePmmlModel.getSourcesMap().isEmpty());
final List<String> generatedRuleMappers = IntStream.range(0, 3).mapToObj(i -> "apackage" + i + "." + KIE_PMML_RULE_MAPPER_CLASS_NAME).collect(Collectors.toList());
PMMLCompilerService.addPMMLRuleMappers(kiePmmlModel, generatedRuleMappers, "source_path");
assertFalse(kiePmmlModel.getSourcesMap().isEmpty());
String expected = kiePmmlModel.getKModulePackageName() + "." + KIE_PMML_RULE_MAPPERS_CLASS_NAME;
assertTrue(kiePmmlModel.getSourcesMap().containsKey(expected));
}
Aggregations