use of org.kie.kogito.explainability.local.counterfactual.entities.LongEntity in project kogito-apps by kiegroup.
the class CounterfactualEntityFactoryTest method testLongFactory.
@Test
void testLongFactory() {
final long value = 5;
final FeatureDomain domain = NumericalFeatureDomain.create(0.0, 10.0);
final Feature feature = FeatureFactory.newNumericalFeature("long-feature", value, domain);
final CounterfactualEntity counterfactualEntity = CounterfactualEntityFactory.from(feature);
assertNotNull(counterfactualEntity);
assertTrue(counterfactualEntity instanceof LongEntity);
assertEquals(value, counterfactualEntity.asFeature().getValue().asNumber());
}
Aggregations