Search in sources :

Example 1 with BooleanEntity

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

the class CounterfactualEntityFactoryTest method testBooleanFactory.

@Test
void testBooleanFactory() {
    final boolean value = false;
    final Feature feature = FeatureFactory.newBooleanFeature("bool-feature", value, EmptyFeatureDomain.create());
    final CounterfactualEntity counterfactualEntity = CounterfactualEntityFactory.from(feature);
    assertTrue(counterfactualEntity instanceof BooleanEntity);
    assertEquals(value, counterfactualEntity.asFeature().getValue().getUnderlyingObject());
}
Also used : CounterfactualEntity(org.kie.kogito.explainability.local.counterfactual.entities.CounterfactualEntity) Feature(org.kie.kogito.explainability.model.Feature) BooleanEntity(org.kie.kogito.explainability.local.counterfactual.entities.BooleanEntity) FixedBooleanEntity(org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedBooleanEntity) Test(org.junit.jupiter.api.Test)

Aggregations

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