Search in sources :

Example 1 with KiePMMLCompoundPredicate

use of org.kie.pmml.commons.model.predicates.KiePMMLCompoundPredicate in project drools by kiegroup.

the class KiePMMLCompoundPredicateInstanceFactoryTest method getKiePMMLCompoundPredicate.

@Test
public void getKiePMMLCompoundPredicate() {
    List<Field<?>> fields = IntStream.range(0, 3).mapToObj(i -> getRandomDataField()).collect(Collectors.toList());
    final CompoundPredicate toConvert = getRandomCompoundPredicate(fields);
    final KiePMMLCompoundPredicate retrieved = KiePMMLCompoundPredicateInstanceFactory.getKiePMMLCompoundPredicate(toConvert, fields);
    commonVerifyKKiePMMLCompoundPredicate(retrieved, toConvert);
}
Also used : IntStream(java.util.stream.IntStream) CompoundPredicate(org.dmg.pmml.CompoundPredicate) PMMLModelTestUtils.getRandomCompoundPredicate(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomCompoundPredicate) List(java.util.List) Field(org.dmg.pmml.Field) InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate) KiePMMLCompoundPredicate(org.kie.pmml.commons.model.predicates.KiePMMLCompoundPredicate) Test(org.junit.Test) PMMLModelTestUtils.getRandomDataField(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomDataField) Collectors(java.util.stream.Collectors) Field(org.dmg.pmml.Field) PMMLModelTestUtils.getRandomDataField(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomDataField) InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate) KiePMMLCompoundPredicate(org.kie.pmml.commons.model.predicates.KiePMMLCompoundPredicate) CompoundPredicate(org.dmg.pmml.CompoundPredicate) PMMLModelTestUtils.getRandomCompoundPredicate(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomCompoundPredicate) InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate) KiePMMLCompoundPredicate(org.kie.pmml.commons.model.predicates.KiePMMLCompoundPredicate) Test(org.junit.Test)

Aggregations

List (java.util.List)1 Collectors (java.util.stream.Collectors)1 IntStream (java.util.stream.IntStream)1 CompoundPredicate (org.dmg.pmml.CompoundPredicate)1 Field (org.dmg.pmml.Field)1 Test (org.junit.Test)1 KiePMMLCompoundPredicate (org.kie.pmml.commons.model.predicates.KiePMMLCompoundPredicate)1 PMMLModelTestUtils.getRandomCompoundPredicate (org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomCompoundPredicate)1 PMMLModelTestUtils.getRandomDataField (org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomDataField)1 InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate (org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKKiePMMLCompoundPredicate)1