Search in sources :

Example 1 with FixedIntegerEntity

use of org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedIntegerEntity in project kogito-apps by kiegroup.

the class CounterfactualEntityFactoryTest method testFixedIntegerFactory.

@Test
void testFixedIntegerFactory() {
    final int value = 5;
    final Feature feature = FeatureFactory.newNumericalFeature("int-feature", value);
    final CounterfactualEntity counterfactualEntity = CounterfactualEntityFactory.from(feature);
    assertTrue(counterfactualEntity instanceof FixedIntegerEntity);
    assertEquals(value, counterfactualEntity.asFeature().getValue().asNumber());
}
Also used : CounterfactualEntity(org.kie.kogito.explainability.local.counterfactual.entities.CounterfactualEntity) FixedIntegerEntity(org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedIntegerEntity) Feature(org.kie.kogito.explainability.model.Feature) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 CounterfactualEntity (org.kie.kogito.explainability.local.counterfactual.entities.CounterfactualEntity)1 FixedIntegerEntity (org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedIntegerEntity)1 Feature (org.kie.kogito.explainability.model.Feature)1