Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main branch with Apache main branch #27

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading