use of org.kie.kogito.jitexecutor.dmn.requests.JITDMNPayload in project kogito-apps by kiegroup.
the class JITDMNResourceTest method testjitdmnResultEndpoint.
@Test
public void testjitdmnResultEndpoint() {
JITDMNPayload jitdmnpayload = new JITDMNPayload(model, buildContext());
given().contentType(ContentType.JSON).body(jitdmnpayload).when().post("/jitdmn/dmnresult").then().statusCode(200).body(containsString("Loan Approval"), containsString("Approved"), containsString("xls2dmn"));
}
use of org.kie.kogito.jitexecutor.dmn.requests.JITDMNPayload in project kogito-apps by kiegroup.
the class JITDMNResourceTest method testjitEndpoint.
@Test
public void testjitEndpoint() {
JITDMNPayload jitdmnpayload = new JITDMNPayload(model, buildContext());
given().contentType(ContentType.JSON).body(jitdmnpayload).when().post("/jitdmn").then().statusCode(200).body(containsString("Loan Approval"), containsString("Approved"));
}
use of org.kie.kogito.jitexecutor.dmn.requests.JITDMNPayload in project kogito-apps by kiegroup.
the class MultipleModelsTest method testjitExplainabilityEndpoint.
@Test
public void testjitExplainabilityEndpoint() {
JITDMNPayload jitdmnpayload = new JITDMNPayload(XAIURI1, List.of(xaimodel1, model1, model2), Map.of("FICO Score", 800, "DTI Ratio", .1, "PITI Ratio", .1));
given().contentType(ContentType.JSON).body(jitdmnpayload).when().post("/jitdmn/evaluateAndExplain").then().statusCode(200).body(containsString("dmnResult"), containsString("saliencies"), containsString("xls2dmn"), containsString("featureName"));
}
use of org.kie.kogito.jitexecutor.dmn.requests.JITDMNPayload in project kogito-apps by kiegroup.
the class JITDMNResourceTest method testjitExplainabilityEndpoint.
@Test
public void testjitExplainabilityEndpoint() {
JITDMNPayload jitdmnpayload = new JITDMNPayload(model, buildContext());
given().contentType(ContentType.JSON).body(jitdmnpayload).when().post("/jitdmn/evaluateAndExplain").then().statusCode(200).body(containsString("dmnResult"), containsString("saliencies"), containsString("xls2dmn"), containsString("featureName"));
}
use of org.kie.kogito.jitexecutor.dmn.requests.JITDMNPayload in project kogito-apps by kiegroup.
the class JITDMNResourceTest method testjitdmnWithExtensionElements.
@Test
public void testjitdmnWithExtensionElements() {
Map<String, Object> context = new HashMap<>();
context.put("m", 1);
context.put("n", 2);
JITDMNPayload jitdmnpayload = new JITDMNPayload(modelWithExtensionElements, context);
given().contentType(ContentType.JSON).body(jitdmnpayload).when().post("/jitdmn/dmnresult").then().statusCode(200).body(containsString("m"), containsString("n"), containsString("sum"));
}
Aggregations