Search in sources :

Example 1 with FixedBooleanEntity

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

the class CounterfactualEntityFactoryTest method testFixedBooleanFactory.

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

Aggregations

Test (org.junit.jupiter.api.Test)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