gitgabrio commented on code in PR #6387: URL: https://github.com/apache/incubator-kie-drools/pull/6387#discussion_r2180005721
########## kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNCompilerTest.java: ########## @@ -508,6 +510,47 @@ void checkModelWithGroupNode(VariantTestConf conf) { assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse(); } + @ParameterizedTest + @MethodSource("params") + void errorHandlingWithDefaultMode(VariantTestConf conf) { + testConfig = conf; + String nameSpace = "https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31155E"; + final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("invalid_models/DMNv1_6/DMN-MultipleInvalidElements.dmn", this.getClass()); + final DMNModel dmnModel = runtime.getModel( + nameSpace, + "DMN_8F7C4323-412A-4E0B-9AEF-0F24C8F55282"); + assertThat(dmnModel).isNotNull(); + assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse(); + } + + @ParameterizedTest + @MethodSource("params") + void errorHandlingWithLenientMode(VariantTestConf conf) { + testConfig = conf; + String nameSpace = "https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31155E"; + final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("invalid_models/DMNv1_6/DMN-MultipleInvalidElements.dmn", this.getClass()); + ((DMNRuntimeImpl)runtime).setOption(new RuntimeModeOption(RuntimeModeOption.MODE.LENIENT)); + final DMNModel dmnModel = runtime.getModel( + nameSpace, + "DMN_8F7C4323-412A-4E0B-9AEF-0F24C8F55282"); + assertThat(dmnModel).isNotNull(); + assertThat(dmnModel.hasErrors()).as(DMNRuntimeUtil.formatMessages(dmnModel.getMessages())).isFalse(); + } + + @ParameterizedTest + @MethodSource("params") + void errorHandlingWithStrictMode(VariantTestConf conf) { + testConfig = conf; + String nameSpace = "https://kie.org/dmn/_79591DB5-1EE1-4CBD-AA5D-2E3EDF31155E"; + final DMNRuntime runtime = DMNRuntimeUtil.createRuntime("invalid_models/DMNv1_6/DMN-MultipleInvalidElements.dmn", this.getClass()); + ((DMNRuntimeImpl)runtime).setOption(new RuntimeModeOption(RuntimeModeOption.MODE.LENIENT)); Review Comment: ouch -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@kie.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@kie.apache.org For additional commands, e-mail: commits-h...@kie.apache.org