This is an automated email from the ASF dual-hosted git repository.

gitgabrio pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git


The following commit(s) were added to refs/heads/main by this push:
     new 45cd90710 [fix-DMN15Test] Fix test (#2034)
45cd90710 is described below

commit 45cd90710647e0560d44d98e3a575090eacac8f1
Author: Gabriele Cardosi <[email protected]>
AuthorDate: Tue May 7 17:41:48 2024 +0200

    [fix-DMN15Test] Fix test (#2034)
    
    * [fix-DMN15Test] Fix test
    
    * [fix-DMN15Test] Fix test
    
    ---------
    
    Co-authored-by: Gabriele-Cardosi <[email protected]>
---
 .../org/kie/kogito/jitexecutor/dmn/DMN15Test.java    | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git 
a/jitexecutor/jitexecutor-dmn/src/test/java/org/kie/kogito/jitexecutor/dmn/DMN15Test.java
 
b/jitexecutor/jitexecutor-dmn/src/test/java/org/kie/kogito/jitexecutor/dmn/DMN15Test.java
index a581ae743..140d1808b 100644
--- 
a/jitexecutor/jitexecutor-dmn/src/test/java/org/kie/kogito/jitexecutor/dmn/DMN15Test.java
+++ 
b/jitexecutor/jitexecutor-dmn/src/test/java/org/kie/kogito/jitexecutor/dmn/DMN15Test.java
@@ -19,10 +19,14 @@
 package org.kie.kogito.jitexecutor.dmn;
 
 import java.io.IOException;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.databind.type.CollectionType;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.response.ValidatableResponse;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.kie.kogito.jitexecutor.common.requests.MultipleResourcesPayload;
@@ -32,13 +36,6 @@ import 
org.kie.kogito.jitexecutor.dmn.responses.JITDMNMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.databind.type.CollectionType;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import io.restassured.http.ContentType;
-import io.restassured.response.ValidatableResponse;
-
 import static io.restassured.RestAssured.given;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -75,9 +72,10 @@ class DMN15Test {
     private void commonUnnamedImport(String importingModelRef, String 
importedModelRef) throws IOException {
         ResourceWithURI model1 = new ResourceWithURI(importingModelRef, 
getModelFromIoUtils(importingModelRef));
         ResourceWithURI model2 = new ResourceWithURI(importedModelRef, 
getModelFromIoUtils(importedModelRef));
-
+        Map<String, Object> context =
+                Map.of("A Person", Map.of("name", "John", "age", 47));
         JITDMNPayload jitdmnpayload = new JITDMNPayload(importingModelRef, 
List.of(model1, model2),
-                Collections.EMPTY_MAP);
+                                                        context);
         given()
                 .contentType(ContentType.JSON)
                 .body(jitdmnpayload)
@@ -100,8 +98,6 @@ class DMN15Test {
         List<JITDMNMessage> messages = MAPPER.readValue(response, 
LIST_OF_MSGS);
         assertEquals(0, messages.size());
 
-        Map<String, Object> context =
-                Map.of("A Person", Map.of("name", "John", "age", 47));
         jitdmnpayload = new JITDMNPayload(importingModelRef, List.of(model1, 
model2), context);
         given()
                 .contentType(ContentType.JSON)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to