Skip to content

Commit

Permalink
Merge pull request #27 from rgdoliveira/sync_main_1
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored May 9, 2024
2 parents 799d25c + 55dc778 commit a7da474
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,13 +36,6 @@
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;
Expand Down Expand Up @@ -75,9 +72,10 @@ void unnamedImportWithoutHrefNamespace() throws IOException {
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)
Expand All @@ -100,8 +98,6 @@ private void commonUnnamedImport(String importingModelRef, String importedModelR
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)
Expand Down

0 comments on commit a7da474

Please sign in to comment.