use of org.kie.dmn.core.compiler.RuntimeTypeCheckOption in project drools by kiegroup.
the class DMNRuntimeTypeCheckTest method testAskTypeCheckInKModuleButOverrideRuntime.
@Test
public void testAskTypeCheckInKModuleButOverrideRuntime() {
DMNRuntime runtime = getRuntimeWithTypeCheckOption("true", ks.getResources().newClassPathResource("forTypeCheckTest.dmn", this.getClass()));
((DMNRuntimeImpl) runtime).setOption(new RuntimeTypeCheckOption(false));
assertPerformTypeCheck(runtime);
}
use of org.kie.dmn.core.compiler.RuntimeTypeCheckOption in project drools by kiegroup.
the class DMNRuntimeTypeCheckTest method testExplicitDisableTypeCheckInKModuleButOverrideRuntime.
@Test
public void testExplicitDisableTypeCheckInKModuleButOverrideRuntime() {
DMNRuntime runtime = getRuntimeWithTypeCheckOption("false", ks.getResources().newClassPathResource("forTypeCheckTest.dmn", this.getClass()));
((DMNRuntimeImpl) runtime).setOption(new RuntimeTypeCheckOption(true));
assertPerformTypeCheck(runtime);
}
use of org.kie.dmn.core.compiler.RuntimeTypeCheckOption in project drools by kiegroup.
the class DMNRuntimeTypeCheckTest method testDefaultNoTypeCheckButOverrideRuntime.
@Test
public void testDefaultNoTypeCheckButOverrideRuntime() {
// do NOT use the DMNRuntimeUtil as that enables typeSafe check override for runtime.
final KieContainer kieContainer = KieHelper.getKieContainer(ks.newReleaseId("org.kie", "dmn-test-" + UUID.randomUUID(), "1.0"), ks.getResources().newClassPathResource("forTypeCheckTest.dmn", this.getClass()));
DMNRuntime runtime = kieContainer.newKieSession().getKieRuntime(DMNRuntime.class);
((DMNRuntimeImpl) runtime).setOption(new RuntimeTypeCheckOption(true));
assertPerformTypeCheck(runtime);
}
use of org.kie.dmn.core.compiler.RuntimeTypeCheckOption in project drools by kiegroup.
the class DMNRuntimeUtil method typeSafeGetKieRuntime.
private static DMNRuntime typeSafeGetKieRuntime(final KieContainer kieContainer) {
DMNRuntime dmnRuntime = kieContainer.newKieSession().getKieRuntime(DMNRuntime.class);
((DMNRuntimeImpl) dmnRuntime).setOption(new RuntimeTypeCheckOption(true));
return dmnRuntime;
}
Aggregations