diff --git a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/util/DefaultDMNMessagesManager.java b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/util/DefaultDMNMessagesManager.java
index 0c30dfaed30..11898a6ace4 100644
--- a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/util/DefaultDMNMessagesManager.java
+++ b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/util/DefaultDMNMessagesManager.java
@@ -71,11 +71,6 @@ public void addAllUnfiltered(List extends DMNMessage> messages) {
@Override
public DMNMessage addMessage(DMNMessage newMessage) {
- for( DMNMessage existingMessage : messages ) {
- if( isDuplicate( existingMessage, newMessage ) ) {
- return existingMessage;
- }
- }
this.messages.add( newMessage );
return newMessage;
}
@@ -98,9 +93,4 @@ public DMNMessage addMessage(DMNMessage.Severity severity, String message, DMNMe
return addMessage( msg );
}
- private boolean isDuplicate(DMNMessage existingMsg, DMNMessage newMessage) {
- return existingMsg.getMessageType().equals( newMessage.getMessageType() ) &&
- existingMsg.getSourceReference() == newMessage.getSourceReference();
- }
-
}
diff --git a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
index fe302231d7f..3700ee8f5f8 100644
--- a/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
+++ b/kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java
@@ -3172,4 +3172,19 @@ public void testSoundLevelAllowNullItemDef() {
assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isFalse();
assertThat(dmnResult.getDecisionResultByName("Evaluation").getResult()).isEqualTo("Unknown");
}
+
+ @Test
+ public void testKieIssue270() {
+ final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("habitability.dmn", this.getClass() );
+ final DMNModel dmnModel = runtime.getModel("https://kiegroup.org/dmn/_93836704-04E9-45B6-8D10-51409FEBDF25", "habitability" );
+ assertThat(dmnModel).isNotNull();
+ assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse();
+
+ final DMNContext context = DMNFactory.newContext();
+
+ final DMNResult dmnResult = runtime.evaluateAll(dmnModel, context);
+ assertThat(dmnResult.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnResult.getMessages())).isTrue();
+ assertThat(dmnResult.getMessages()).hasSize(2);
+ assertThat(dmnResult.getMessages()).extracting(DMNMessage::getText).contains("DMN: Required dependency 'temperature' not found on node 'habitability' (DMN id: _0699341C-A1BE-4B6D-B8D5-3972D67FCA45, The referenced node was not found) ", "DMN: Required dependency 'oxygene' not found on node 'habitability' (DMN id: _0699341C-A1BE-4B6D-B8D5-3972D67FCA45, The referenced node was not found) ");
+ }
}
diff --git a/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/habitability.dmn b/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/habitability.dmn
new file mode 100644
index 00000000000..c60143d047f
--- /dev/null
+++ b/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/habitability.dmn
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ oxygene
+
+
+
+
+ temperature
+
+
+
+
+
+
+ [10..100]
+
+
+ < 40
+
+
+ "somehow doable"
+
+
+
+
+
+
+
+ <10
+
+
+ < 40
+
+
+ "hardly doable"
+
+
+
+
+
+
+
+ -
+
+
+ >= 40
+
+
+ "too hot"
+
+
+
+
+
+
+
+
+
+
+
+
+ 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorAuthorityRequirementTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorAuthorityRequirementTest.java
index edf7964d8b5..8fd5a2bc3d5 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorAuthorityRequirementTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorAuthorityRequirementTest.java
@@ -39,7 +39,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_ReaderInput() throws IOExce
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -49,7 +49,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_AUTH.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -60,7 +60,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_AUTH"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -70,7 +70,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_ReaderInput() throws IOExcep
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -80,7 +80,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_DEC.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -91,7 +91,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_DEC"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -101,7 +101,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_ReaderInput() throws IOExc
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -111,7 +111,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_INPUT.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -122,7 +122,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -132,7 +132,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_ReaderInput() throws IO
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -142,7 +142,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -153,7 +153,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -163,7 +163,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_ReaderInput() throws IOExceptio
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -173,7 +173,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_DEC_NOT_DECISION.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -184,7 +184,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_DEC_NOT_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -194,7 +194,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_ReaderInput() throws IOException
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -204,7 +204,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_INPUT_NOT_INPUT.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -215,7 +215,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_INPUT_NOT_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorBusinessKnowledgeModelTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorBusinessKnowledgeModelTest.java
index 0c8622f4378..28bafe8d733 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorBusinessKnowledgeModelTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorBusinessKnowledgeModelTest.java
@@ -39,7 +39,7 @@ public void testBKM_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -49,7 +49,7 @@ public void testBKM_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("businessknowledgemodel/BKM_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -60,7 +60,7 @@ public void testBKM_MISSING_VAR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"BKM_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -101,7 +101,7 @@ public void testBKM_MISSING_EXPR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
@@ -111,7 +111,7 @@ public void testBKM_MISSING_EXPR_FileInput() {
final List validate = validator.validate(
getFile("businessknowledgemodel/BKM_MISSING_EXPR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -122,7 +122,7 @@ public void testBKM_MISSING_EXPR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"BKM_MISSING_EXPR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDMNElementReferenceTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDMNElementReferenceTest.java
index 7cfb6740362..a1685a5411d 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDMNElementReferenceTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDMNElementReferenceTest.java
@@ -62,7 +62,7 @@ public void testELEMREF_NOHASH_DefinitionsInput() {
}
private void assertValiadationResult(List validationMessages) {
- assertThat(validationMessages).as(ValidatorUtil.formatMessages(validationMessages)).hasSize(3);
+ assertThat(validationMessages).as(ValidatorUtil.formatMessages(validationMessages)).hasSize(4);
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_HREF_SYNTAX))).isTrue();
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTableTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTableTest.java
index 45b5faab367..e8be36171f7 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTableTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTableTest.java
@@ -40,7 +40,7 @@ public void testDTABLE_EMPTY_ENTRY_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
}
@@ -50,7 +50,7 @@ public void testDTABLE_EMPTY_ENTRY_FileInput() {
final List validate = validator.validate(
getFile("DTABLE_EMPTY_ENTRY.dmn"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
@@ -61,7 +61,7 @@ public void testDTABLE_EMPTY_ENTRY_DefintionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DTABLE_PRIORITY_MISSING_OUTVALS"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
@@ -69,7 +69,7 @@ public void testDTABLE_EMPTY_ENTRY_DefintionsInput() {
public void testDTABLE_MULTIPLEOUT_NAME_ReaderInput() throws IOException {
try (final Reader reader = getReader( "DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT.dmn" )) {
List validate = validator.validate( reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
@@ -79,7 +79,7 @@ public void testDTABLE_MULTIPLEOUT_NAME_ReaderInput() throws IOException {
@Test
public void testDTABLE_MULTIPLEOUT_NAME_FileInput() {
List validate = validator.validate( getFile( "DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
@@ -92,7 +92,7 @@ public void testDTABLE_MULTIPLEOUT_NAME_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTest.java
index 528cff7cc77..a7e27aca09d 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorDecisionTest.java
@@ -39,7 +39,7 @@ public void testDECISION_MISSING_EXPR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
@@ -49,7 +49,7 @@ public void testDECISION_MISSING_EXPR_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_EXPR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -60,7 +60,7 @@ public void testDECISION_MISSING_EXPR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_EXPR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -70,7 +70,7 @@ public void testDECISION_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -80,7 +80,7 @@ public void testDECISION_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -91,7 +91,7 @@ public void testDECISION_MISSING_VAR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -99,7 +99,7 @@ public void testDECISION_MISSING_VAR_DefinitionsInput() {
public void testDECISION_MISSING_VARbis_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_MISSING_VARbis.dmn")) {
final List validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -108,7 +108,7 @@ public void testDECISION_MISSING_VARbis_ReaderInput() throws IOException {
public void testDECISION_MISSING_VARbis_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_VARbis.dmn"), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -119,7 +119,7 @@ public void testDECISION_MISSING_VARbis_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_VARbis"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInformationRequirementTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInformationRequirementTest.java
index 6dde5b9f776..54d924406b4 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInformationRequirementTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInformationRequirementTest.java
@@ -39,7 +39,7 @@ public void testINFOREQ_MISSING_INPUT_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -50,7 +50,7 @@ public void testINFOREQ_MISSING_INPUT_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_MISSING_INPUT.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -62,7 +62,7 @@ public void testINFOREQ_MISSING_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_MISSING_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -73,7 +73,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -84,7 +84,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_INPUT_NOT_INPUTDATA.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -96,7 +96,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_INPUT_NOT_INPUTDATA"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -107,7 +107,7 @@ public void testINFOREQ_MISSING_DECISION_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -118,7 +118,7 @@ public void testINFOREQ_MISSING_DECISION_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_MISSING_DECISION.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -130,7 +130,7 @@ public void testINFOREQ_MISSING_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_MISSING_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -141,7 +141,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -152,7 +152,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_DECISION_NOT_DECISION.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -164,7 +164,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_DECISION_NOT_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInputDataTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInputDataTest.java
index b90c7ea2634..adf616c635e 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInputDataTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorInputDataTest.java
@@ -39,7 +39,7 @@ public void testINPUT_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -49,7 +49,7 @@ public void testINPUT_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("inputdata/INPUTDATA_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -60,7 +60,7 @@ public void testINPUT_MISSING_VAR_DefintionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INPUTDATA_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeRequirementTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeRequirementTest.java
index a6d9fdb5a13..b88f4ccaee9 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeRequirementTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeRequirementTest.java
@@ -39,7 +39,7 @@ public void testKNOWREQ_MISSING_BKM_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -50,7 +50,7 @@ public void testKNOWREQ_MISSING_BKM_FileInput() {
final List validate = validator.validate(
getFile( "knowledgerequirement/KNOWREQ_MISSING_BKM.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -62,7 +62,7 @@ public void testKNOWREQ_MISSING_BKM_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOWREQ_MISSING_BKM"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -73,7 +73,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -84,7 +84,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_FileInput() {
final List validate = validator.validate(
getFile( "knowledgerequirement/KNOWREQ_REQ_DECISION_NOT_BKM.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -96,7 +96,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOWREQ_REQ_DECISION_NOT_BKM"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeSourceTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeSourceTest.java
index 45bfd498c42..4a3131156f8 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeSourceTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorKnowledgeSourceTest.java
@@ -70,7 +70,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_ReaderInput() throws IOException
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -80,7 +80,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_FileInput() {
final List validate = validator.validate(
getFile( "knowledgesource/KNOW_SOURCE_OWNER_NOT_ORG_UNIT.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -91,7 +91,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOW_SOURCE_OWNER_NOT_ORG_UNIT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTest.java
index ed6f7eb859d..0a4ae5b5f6f 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTest.java
@@ -127,7 +127,7 @@ public void testNAME_IS_VALID() {
@Test
public void testNAME_INVALID_empty_name() {
List validate = validator.validate( getReader( "DROOLS-1447.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.VARIABLE_NAME_MISMATCH))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME) && p.getSourceId().equals("_5e43b55c-888e-443c-b1b9-80e4aa6746bd"))).isTrue();
@@ -189,7 +189,7 @@ public void testITEMCOMP_DUPLICATED() {
@Test
public void testITEMDEF_NOT_UNIQUE() {
List validate = validator.validate( getReader( "ITEMDEF_NOT_UNIQUE.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.DUPLICATED_ITEM_DEF))).isTrue();
}
@@ -261,7 +261,7 @@ public void testUNKNOWN_VARIABLE() {
@Test
public void testVALIDATION() {
List validate = validator.validate( getReader( "validation.dmn" ), VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(7);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
diff --git a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTypeRefTest.java b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTypeRefTest.java
index e45d0810bb4..7007e89cd8e 100644
--- a/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTypeRefTest.java
+++ b/kie-dmn/kie-dmn-legacy-tests/src/test/java/org/kie/dmn/legacy/tests/validation/v1_1/ValidatorTypeRefTest.java
@@ -68,7 +68,7 @@ public void testTYPEREF_NO_NS_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -79,7 +79,7 @@ public void testTYPEREF_NO_NS_FileInput() {
final List validate = validator.validate(
getFile("typeref/TYPEREF_NO_NS.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -89,7 +89,7 @@ public void testTYPEREF_NO_NS_DefinitionsInput() {
final List validate = validator.validate(
getDefinitions("typeref/TYPEREF_NO_NS.dmn", "https://github.com/kiegroup/kie-dmn", "TYPEREF_NO_NS"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -99,7 +99,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -110,7 +110,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_FileInput() {
final List validate = validator.validate(
getFile("typeref/TYPEREF_NOT_FEEL_NOT_DEF.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -120,7 +120,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_DefinitionsInput() {
final List validate = validator.validate(
getDefinitions("typeref/TYPEREF_NOT_FEEL_NOT_DEF.dmn", "https://github.com/kiegroup/kie-dmn", "TYPEREF_NOT_FEEL_NOT_DEF"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorAuthorityRequirementTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorAuthorityRequirementTest.java
index 4fa1667932a..6df13b92f27 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorAuthorityRequirementTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorAuthorityRequirementTest.java
@@ -37,7 +37,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_ReaderInput() throws IOExce
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -47,7 +47,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_AUTH.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -58,7 +58,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_AUTH"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -68,7 +68,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_ReaderInput() throws IOExcep
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -78,7 +78,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_DEC.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -89,7 +89,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_DEC"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -99,7 +99,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_ReaderInput() throws IOExc
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -109,7 +109,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_INPUT.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -120,7 +120,7 @@ public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_MISSING_DEPENDENCY_REQ_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -130,7 +130,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_ReaderInput() throws IO
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -140,7 +140,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -151,7 +151,7 @@ public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -161,7 +161,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_ReaderInput() throws IOExceptio
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -171,7 +171,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_DEC_NOT_DECISION.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -182,7 +182,7 @@ public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_DEC_NOT_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -192,7 +192,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_ReaderInput() throws IOException
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -202,7 +202,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_FileInput() {
final List validate = validator.validate(
getFile("authorityrequirement/AUTHREQ_DEP_REQ_INPUT_NOT_INPUT.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -213,7 +213,7 @@ public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"AUTHREQ_DEP_REQ_INPUT_NOT_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorBusinessKnowledgeModelTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorBusinessKnowledgeModelTest.java
index 1f7b9af60de..5324ae95990 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorBusinessKnowledgeModelTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorBusinessKnowledgeModelTest.java
@@ -37,7 +37,7 @@ public void testBKM_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -47,7 +47,7 @@ public void testBKM_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("businessknowledgemodel/BKM_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -58,7 +58,7 @@ public void testBKM_MISSING_VAR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"BKM_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -99,7 +99,7 @@ public void testBKM_MISSING_EXPR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).withFailMessage(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
@@ -109,7 +109,7 @@ public void testBKM_MISSING_EXPR_FileInput() {
final List validate = validator.validate(
getFile("businessknowledgemodel/BKM_MISSING_EXPR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).withFailMessage(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -120,7 +120,7 @@ public void testBKM_MISSING_EXPR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"BKM_MISSING_EXPR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).withFailMessage(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDMNElementReferenceTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDMNElementReferenceTest.java
index 4d7b9f386bc..488148a26c1 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDMNElementReferenceTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDMNElementReferenceTest.java
@@ -60,7 +60,7 @@ public void testELEMREF_NOHASH_DefinitionsInput() {
}
private void assertValiadationResult(List validationMessages) {
- assertThat(validationMessages).as(ValidatorUtil.formatMessages(validationMessages)).hasSize(3);
+ assertThat(validationMessages).as(ValidatorUtil.formatMessages(validationMessages)).hasSize(4);
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_HREF_SYNTAX))).isTrue();
assertThat(validationMessages.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTableTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTableTest.java
index 49d7ddced3a..fad62c8c99e 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTableTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTableTest.java
@@ -38,7 +38,7 @@ public void testDTABLE_EMPTY_ENTRY_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
}
@@ -48,7 +48,7 @@ public void testDTABLE_EMPTY_ENTRY_FileInput() {
final List validate = validator.validate(
getFile("DTABLE_EMPTY_ENTRY.dmn"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
@@ -59,7 +59,7 @@ public void testDTABLE_EMPTY_ENTRY_DefintionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DTABLE_PRIORITY_MISSING_OUTVALS"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
}
@@ -67,7 +67,7 @@ public void testDTABLE_EMPTY_ENTRY_DefintionsInput() {
public void testDTABLE_MULTIPLEOUT_NAME_ReaderInput() throws IOException {
try (final Reader reader = getReader( "DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT.dmn" )) {
List validate = validator.validate( reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
@@ -77,7 +77,7 @@ public void testDTABLE_MULTIPLEOUT_NAME_ReaderInput() throws IOException {
@Test
public void testDTABLE_MULTIPLEOUT_NAME_FileInput() {
List validate = validator.validate( getFile( "DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
@@ -90,7 +90,7 @@ public void testDTABLE_MULTIPLEOUT_NAME_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DTABLE_MULTIPLEOUTPUT_WRONG_OUTPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(6);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTest.java
index af706fae063..45cf94b4d11 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorDecisionTest.java
@@ -43,7 +43,7 @@ public void testDECISION_MISSING_EXPR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
}
@@ -53,7 +53,7 @@ public void testDECISION_MISSING_EXPR_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_EXPR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -64,7 +64,7 @@ public void testDECISION_MISSING_EXPR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_EXPR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.get(0).getMessageType()).as(validate.get(0).toString()).isEqualTo(DMNMessageType.MISSING_EXPRESSION);
}
@@ -74,7 +74,7 @@ public void testDECISION_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -84,7 +84,7 @@ public void testDECISION_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -95,7 +95,7 @@ public void testDECISION_MISSING_VAR_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -103,7 +103,7 @@ public void testDECISION_MISSING_VAR_DefinitionsInput() {
public void testDECISION_MISSING_VARbis_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_MISSING_VARbis.dmn")) {
final List validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -112,7 +112,7 @@ public void testDECISION_MISSING_VARbis_ReaderInput() throws IOException {
public void testDECISION_MISSING_VARbis_FileInput() {
final List validate = validator.validate(
getFile("decision/DECISION_MISSING_VARbis.dmn"), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -123,7 +123,7 @@ public void testDECISION_MISSING_VARbis_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"DECISION_MISSING_VARbis"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInformationRequirementTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInformationRequirementTest.java
index ce84fc583e2..4378b418655 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInformationRequirementTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInformationRequirementTest.java
@@ -37,7 +37,7 @@ public void testINFOREQ_MISSING_INPUT_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -48,7 +48,7 @@ public void testINFOREQ_MISSING_INPUT_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_MISSING_INPUT.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -60,7 +60,7 @@ public void testINFOREQ_MISSING_INPUT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_MISSING_INPUT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -71,7 +71,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -82,7 +82,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_INPUT_NOT_INPUTDATA.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -94,7 +94,7 @@ public void testINFOREQ_INPUT_NOT_INPUTDATA_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_INPUT_NOT_INPUTDATA"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -105,7 +105,7 @@ public void testINFOREQ_MISSING_DECISION_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -116,7 +116,7 @@ public void testINFOREQ_MISSING_DECISION_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_MISSING_DECISION.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -128,7 +128,7 @@ public void testINFOREQ_MISSING_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_MISSING_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -139,7 +139,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -150,7 +150,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_FileInput() {
final List validate = validator.validate(
getFile( "informationrequirement/INFOREQ_DECISION_NOT_DECISION.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -162,7 +162,7 @@ public void testINFOREQ_DECISION_NOT_DECISION_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INFOREQ_DECISION_NOT_DECISION"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInputDataTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInputDataTest.java
index c2ff2361bfd..81e9c25d083 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInputDataTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorInputDataTest.java
@@ -36,7 +36,7 @@ public void testINPUT_MISSING_VAR_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
}
@@ -46,7 +46,7 @@ public void testINPUT_MISSING_VAR_FileInput() {
final List validate = validator.validate(
getFile("inputdata/INPUTDATA_MISSING_VAR.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
@@ -57,7 +57,7 @@ public void testINPUT_MISSING_VAR_DefintionsInput() {
"https://github.com/kiegroup/kie-dmn",
"INPUTDATA_MISSING_VAR"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_VARIABLE))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeRequirementTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeRequirementTest.java
index b2f2f87ad86..dd9edc866aa 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeRequirementTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeRequirementTest.java
@@ -37,7 +37,7 @@ public void testKNOWREQ_MISSING_BKM_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -48,7 +48,7 @@ public void testKNOWREQ_MISSING_BKM_FileInput() {
final List validate = validator.validate(
getFile( "knowledgerequirement/KNOWREQ_MISSING_BKM.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -60,7 +60,7 @@ public void testKNOWREQ_MISSING_BKM_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOWREQ_MISSING_BKM"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -71,7 +71,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -82,7 +82,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_FileInput() {
final List validate = validator.validate(
getFile( "knowledgerequirement/KNOWREQ_REQ_DECISION_NOT_BKM.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -94,7 +94,7 @@ public void testKNOWREQ_REQ_DECISION_NOT_BKM_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOWREQ_REQ_DECISION_NOT_BKM"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeSourceTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeSourceTest.java
index fe4c6f83bce..02ba26d120a 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeSourceTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorKnowledgeSourceTest.java
@@ -68,7 +68,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_ReaderInput() throws IOException
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
@@ -78,7 +78,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_FileInput() {
final List validate = validator.validate(
getFile( "knowledgesource/KNOW_SOURCE_OWNER_NOT_ORG_UNIT.dmn" ),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
@@ -89,7 +89,7 @@ public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_DefinitionsInput() {
"https://github.com/kiegroup/kie-dmn",
"KNOW_SOURCE_OWNER_NOT_ORG_UNIT"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND))).isTrue();
}
}
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
index 3918a611ccf..8ec41547655 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
@@ -130,7 +130,7 @@ public void testNAME_IS_VALID() {
@Test
public void testNAME_INVALID_empty_name() {
List validate = validator.validate( getReader( "DROOLS-1447.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(5);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.VARIABLE_NAME_MISMATCH))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME) && p.getSourceId().equals("_5e43b55c-888e-443c-b1b9-80e4aa6746bd"))).isTrue();
@@ -192,7 +192,7 @@ public void testITEMCOMP_DUPLICATED() {
@Test
public void testITEMDEF_NOT_UNIQUE() {
List validate = validator.validate( getReader( "ITEMDEF_NOT_UNIQUE.dmn" ), VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.DUPLICATED_ITEM_DEF))).isTrue();
}
@@ -287,7 +287,7 @@ public void testUNKNOWN_OPERATOR() {
@Test
public void testVALIDATION() {
List validate = validator.validate( getReader( "validation.dmn" ), VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(5);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(7);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_TYPE_REF))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION))).isTrue();
@@ -448,7 +448,7 @@ public void testDMNv1_3_ch11example1() {
VALIDATE_COMPILATION)
.theseModels(getReader("Financial.dmn", DMN13specificTest.class),
getReader("Chapter 11 Example.dmn", DMN13specificTest.class));
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getLevel() == Level.WARNING &&
p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION) &&
p.getSourceId().equals("_4bd33d4a-741b-444a-968b-64e1841211e7"))).as(ValidatorUtil.formatMessages(validate)).isTrue();
@@ -497,7 +497,7 @@ public void testBkmAndBindingWarnLevel() {
VALIDATE_MODEL,
VALIDATE_COMPILATION);
assertThat(validate.stream().allMatch(p -> p.getLevel() == Level.WARNING)).as(ValidatorUtil.formatMessages(validate)).isTrue();
- assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).withFailMessage(ValidatorUtil.formatMessages(validate)).hasSize(4);
assertThat(validate.stream().anyMatch(p -> p.getLevel() == Level.WARNING &&
p.getSourceId() != null &&
p.getSourceId().equals("_3ce3c41a-450a-40d1-9e9c-09180cd29879"))).as(ValidatorUtil.formatMessages(validate)).isTrue();
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTypeRefTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTypeRefTest.java
index d1d03ea0d88..623fb98d0f2 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTypeRefTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTypeRefTest.java
@@ -37,7 +37,7 @@ public void testTYPEREF_NO_FEEL_TYPE_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
}
@@ -47,7 +47,7 @@ public void testTYPEREF_NO_FEEL_TYPE_FileInput() {
final List validate = validator.validate(
getFile("typeref/TYPEREF_NO_FEEL_TYPE.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -56,7 +56,7 @@ public void testTYPEREF_NO_FEEL_TYPE_DefinitionsInput() {
final List validate = validator.validate(
getDefinitions("typeref/TYPEREF_NO_FEEL_TYPE.dmn", "https://github.com/kiegroup/kie-dmn", "TYPEREF_NO_FEEL_TYPE"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -66,7 +66,7 @@ public void testTYPEREF_NO_NS_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
}
@@ -76,7 +76,7 @@ public void testTYPEREF_NO_NS_FileInput() {
final List validate = validator.validate(
getFile("typeref/TYPEREF_NO_NS.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -85,7 +85,7 @@ public void testTYPEREF_NO_NS_DefinitionsInput() {
final List validate = validator.validate(
getDefinitions("typeref/TYPEREF_NO_NS.dmn", "https://github.com/kiegroup/kie-dmn", "TYPEREF_NO_NS"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(1);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -95,7 +95,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_ReaderInput() throws IOException {
final List validate = validator.validate(
reader,
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -106,7 +106,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_FileInput() {
final List validate = validator.validate(
getFile("typeref/TYPEREF_NOT_FEEL_NOT_DEF.dmn"),
VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}
@@ -116,7 +116,7 @@ public void testTYPEREF_NOT_FEEL_NOT_DEF_DefinitionsInput() {
final List validate = validator.validate(
getDefinitions("typeref/TYPEREF_NOT_FEEL_NOT_DEF.dmn", "https://github.com/kiegroup/kie-dmn", "TYPEREF_NOT_FEEL_NOT_DEF"),
VALIDATE_MODEL, VALIDATE_COMPILATION);
- assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(2);
+ assertThat(validate).as(ValidatorUtil.formatMessages(validate)).hasSize(3);
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.INVALID_NAME))).isTrue();
assertThat(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND))).isTrue();
}