diff --git a/drools-decisiontables/pom.xml b/drools-decisiontables/pom.xml
index f916aee6d04..9aaa947aa23 100644
--- a/drools-decisiontables/pom.xml
+++ b/drools-decisiontables/pom.xml
@@ -87,8 +87,13 @@
- junit
- junit
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+ org.assertj
+ assertj-core
test
@@ -101,11 +106,6 @@
logback-classic
test
-
- org.assertj
- assertj-core
- test
-
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/CalendarTimerResourcesTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/CalendarTimerResourcesTest.java
index 875c57a2f9f..35ce863d23f 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/CalendarTimerResourcesTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/CalendarTimerResourcesTest.java
@@ -21,9 +21,9 @@
import java.util.Calendar;
import java.util.concurrent.TimeUnit;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
@@ -42,7 +42,7 @@ public class CalendarTimerResourcesTest {
private SessionPseudoClock clock;
- @Before
+ @BeforeEach
public void init() {
final KieServices ks = KieServices.Factory.get();
@@ -66,7 +66,7 @@ public void init() {
clock = ksession.getSessionClock();
}
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/ColumnReplaceTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/ColumnReplaceTest.java
index 62b75c7751d..a70b119dddf 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/ColumnReplaceTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/ColumnReplaceTest.java
@@ -21,7 +21,7 @@
import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.internal.builder.DecisionTableConfiguration;
import org.kie.internal.builder.DecisionTableInputType;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/DecimalSeparatorTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/DecimalSeparatorTest.java
index 92e749eca2c..da45b0d48cf 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/DecimalSeparatorTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/DecimalSeparatorTest.java
@@ -20,8 +20,8 @@
import java.util.Locale;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
@@ -56,7 +56,7 @@ public void init() {
ksession = ks.newKieContainer(ks.getRepository().getDefaultReleaseId()).newKieSession();
}
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/DumpGeneratedDrlTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/DumpGeneratedDrlTest.java
index 214859716fe..b58f03248db 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/DumpGeneratedDrlTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/DumpGeneratedDrlTest.java
@@ -23,9 +23,9 @@
import org.apache.commons.io.FileUtils;
import org.drools.util.IoUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.ReleaseId;
import org.kie.api.io.Resource;
@@ -57,7 +57,7 @@ public class DumpGeneratedDrlTest {
private File dumpDir;
private String dumpDirPropOrigValue;
- @Before
+ @BeforeEach
public void setUp() {
dumpDir = new File("target/drools-dump-dir");
// delete the dir before test to remove possible leftovers from previous runs
@@ -71,7 +71,7 @@ public void setUp() {
System.setProperty(DumpDirOption.PROPERTY_NAME, dumpDir.getAbsolutePath());
}
- @After
+ @AfterEach
public void tearDown() {
if (dumpDirPropOrigValue != null) {
System.setProperty(DumpDirOption.PROPERTY_NAME, dumpDirPropOrigValue);
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/EmptyHeaderTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/EmptyHeaderTest.java
index d3be1fbfb0e..1a03b5bdee8 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/EmptyHeaderTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/EmptyHeaderTest.java
@@ -19,11 +19,12 @@
package org.drools.decisiontable;
import org.drools.template.parser.DecisionTableParseException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.internal.builder.DecisionTableConfiguration;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.kie.api.io.ResourceType.DTABLE;
import static org.kie.internal.builder.DecisionTableInputType.CSV;
import static org.kie.internal.builder.DecisionTableInputType.XLS;
@@ -31,21 +32,23 @@
public class EmptyHeaderTest {
- @Test(expected = DecisionTableParseException.class)
+ @Test
public void testEmptyConditionInXLS() {
DecisionTableConfiguration dtconf = KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType(XLS);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory .newKnowledgeBuilder();
- kbuilder.add(newClassPathResource("emptyCondition.drl.xls", getClass()), DTABLE, dtconf);
+ assertThatExceptionOfType((DecisionTableParseException.class)).isThrownBy(
+ () -> kbuilder.add(newClassPathResource("emptyCondition.drl.xls", getClass()), DTABLE, dtconf));
}
- @Test(expected = DecisionTableParseException.class)
+ @Test
public void testEmptyActionInCSV() {
DecisionTableConfiguration dtconf = KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType(CSV);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- kbuilder.add(newClassPathResource("emptyAction.drl.csv", getClass()), DTABLE, dtconf);
+ assertThatExceptionOfType((DecisionTableParseException.class)).isThrownBy(
+ () -> kbuilder.add(newClassPathResource("emptyAction.drl.csv", getClass()), DTABLE, dtconf));
}
}
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/ExternalSpreadsheetCompilerTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/ExternalSpreadsheetCompilerTest.java
index ede2030c4d4..6ce3b82e134 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/ExternalSpreadsheetCompilerTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/ExternalSpreadsheetCompilerTest.java
@@ -29,8 +29,8 @@
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
import org.drools.template.parser.DataListener;
import org.drools.template.parser.TemplateDataListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
import org.kie.internal.builder.KnowledgeBuilder;
@@ -49,7 +49,7 @@ public class ExternalSpreadsheetCompilerTest {
private ExternalSpreadsheetCompiler converter;
- @Before
+ @BeforeEach
public void setUp() {
converter = new ExternalSpreadsheetCompiler();
}
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/FixedPatternTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/FixedPatternTest.java
index 99d1f0adc48..02fe7159aa5 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/FixedPatternTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/FixedPatternTest.java
@@ -23,8 +23,8 @@
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
import org.kie.internal.builder.DecisionTableConfiguration;
@@ -40,7 +40,7 @@ public class FixedPatternTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/IgnoreNumericFormatTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/IgnoreNumericFormatTest.java
index 857ace04324..1f854ee2324 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/IgnoreNumericFormatTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/IgnoreNumericFormatTest.java
@@ -23,8 +23,8 @@
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
import org.kie.internal.builder.DecisionTableConfiguration;
@@ -40,7 +40,7 @@ public class IgnoreNumericFormatTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/LineBreakXLSTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/LineBreakXLSTest.java
index 864e15ccd46..37903db8589 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/LineBreakXLSTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/LineBreakXLSTest.java
@@ -21,8 +21,8 @@
import com.sample.FactData;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
import org.kie.internal.builder.DecisionTableConfiguration;
@@ -38,7 +38,7 @@ public class LineBreakXLSTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/LinkedWorkbookTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/LinkedWorkbookTest.java
index 557bbc8fdf2..7be86113af9 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/LinkedWorkbookTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/LinkedWorkbookTest.java
@@ -20,7 +20,7 @@
import java.io.InputStream;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieBase;
import org.kie.api.io.ResourceType;
import org.kie.internal.io.ResourceFactory;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/MakeSureMultiLinesWorkTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/MakeSureMultiLinesWorkTest.java
index 4200d906990..2d539087876 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/MakeSureMultiLinesWorkTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/MakeSureMultiLinesWorkTest.java
@@ -20,8 +20,7 @@
import java.io.InputStream;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
import org.kie.api.KieBase;
import org.kie.api.io.ResourceType;
import org.kie.internal.io.ResourceFactory;
@@ -29,10 +28,10 @@
import static org.assertj.core.api.Assertions.assertThat;
-@Ignore
+@Disabled
public class MakeSureMultiLinesWorkTest {
- @Test
+ @org.junit.jupiter.api.Test
public void makeSureMultiLinesWork() {
KieHelper kieHelper = new KieHelper();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/PrioritySetWithFormulaTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/PrioritySetWithFormulaTest.java
index 35f057a84d8..9610a8baac9 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/PrioritySetWithFormulaTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/PrioritySetWithFormulaTest.java
@@ -19,8 +19,8 @@
package org.drools.decisiontable;
import org.drools.base.definitions.rule.impl.RuleImpl;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
@@ -33,7 +33,7 @@ public class PrioritySetWithFormulaTest {
private KieBase kieBase;
- @Before
+ @BeforeEach
public void init() {
final KieServices ks = KieServices.Factory.get();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetCompilerUnitTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetCompilerUnitTest.java
index b7b7a897cab..33f3d2d7dd8 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetCompilerUnitTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetCompilerUnitTest.java
@@ -34,8 +34,8 @@
import org.drools.template.model.Global;
import org.drools.template.model.Import;
import org.drools.template.parser.DataListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieBase;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
@@ -61,7 +61,7 @@ public class SpreadsheetCompilerUnitTest {
private SpreadsheetCompiler converter;
- @Before
+ @BeforeEach
public void setUp() {
converter = new SpreadsheetCompiler();
}
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetIntegrationExampleTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetIntegrationExampleTest.java
index 4114466232a..11e5711d95e 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetIntegrationExampleTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/SpreadsheetIntegrationExampleTest.java
@@ -22,8 +22,8 @@
import java.util.List;
import org.acme.insurance.launcher.PricingRuleLauncher;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
@@ -44,7 +44,7 @@ public class SpreadsheetIntegrationExampleTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInCSVTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInCSVTest.java
index 9f8da876726..9b8da2b6eae 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInCSVTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInCSVTest.java
@@ -24,8 +24,8 @@
import org.drools.drl.extensions.DecisionTableFactory;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.command.Command;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
@@ -43,7 +43,7 @@ public class UnicodeInCSVTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java
index 43dedef0e93..c385dadcc3f 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/UnicodeInXLSTest.java
@@ -24,8 +24,8 @@
import org.drools.drl.extensions.DecisionTableFactory;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.command.Command;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
@@ -43,7 +43,7 @@ public class UnicodeInXLSTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/XlsFormulaTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/XlsFormulaTest.java
index 0536688654b..eb0a5bb3171 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/XlsFormulaTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/XlsFormulaTest.java
@@ -21,8 +21,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
@@ -36,7 +36,7 @@ public class XlsFormulaTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
ksession.dispose();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/IncrementalCompilationTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/IncrementalCompilationTest.java
index ff6213f89f3..373ce0b37c7 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/IncrementalCompilationTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/IncrementalCompilationTest.java
@@ -21,7 +21,7 @@
import java.io.InputStream;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/KModuleWithDecisionTablesTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/KModuleWithDecisionTablesTest.java
index 8ec05fd9d7d..4eee4f66c46 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/KModuleWithDecisionTablesTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/integrationtests/KModuleWithDecisionTablesTest.java
@@ -18,7 +18,6 @@
*/
package org.drools.decisiontable.integrationtests;
-import org.junit.Test;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.builder.KieFileSystem;
@@ -27,6 +26,8 @@
import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.jupiter.api.Test;
+
/**
* Basic tests for creation of a KieBase from CSV and XLS resources.
*/
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ActionTypeTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ActionTypeTest.java
index d86cd606185..1c0572eda70 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ActionTypeTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ActionTypeTest.java
@@ -22,7 +22,7 @@
import java.util.Map;
import org.drools.decisiontable.parser.ActionType.Code;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ColumnFactoryTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ColumnFactoryTest.java
index 20384ab5118..3bf6c558119 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ColumnFactoryTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/ColumnFactoryTest.java
@@ -23,8 +23,8 @@
import org.drools.template.parser.ColumnFactory;
import org.drools.template.parser.LongColumn;
import org.drools.template.parser.StringColumn;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
@@ -33,7 +33,7 @@ public class ColumnFactoryTest {
private ColumnFactory f;
- @Before
+ @BeforeEach
public void setUp() {
f = new ColumnFactory();
}
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/LhsBuilderTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/LhsBuilderTest.java
index 4ba1b0c0be0..25ff4a2e599 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/LhsBuilderTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/LhsBuilderTest.java
@@ -18,7 +18,7 @@
*/
package org.drools.decisiontable.parser;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.drools.decisiontable.parser.LhsBuilder.FieldType.FORALL_FIELD;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/PropertiesSheetListenerTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/PropertiesSheetListenerTest.java
index acba2c64b5a..1a7657af207 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/PropertiesSheetListenerTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/PropertiesSheetListenerTest.java
@@ -20,7 +20,7 @@
import org.drools.decisiontable.parser.xls.PropertiesSheetListener;
import org.drools.decisiontable.parser.xls.PropertiesSheetListener.CaseInsensitiveMap;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.drools.template.parser.DataListener.NON_MERGED;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RhsBuilderTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RhsBuilderTest.java
index 555af32b981..81cadaa6419 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RhsBuilderTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RhsBuilderTest.java
@@ -18,7 +18,7 @@
*/
package org.drools.decisiontable.parser;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleSheetParserUtilTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleSheetParserUtilTest.java
index 3463fc43829..e10aa378866 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleSheetParserUtilTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleSheetParserUtilTest.java
@@ -23,8 +23,8 @@
import org.drools.template.model.Global;
import org.drools.template.model.Import;
import org.drools.template.parser.DecisionTableParseException;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@@ -52,7 +52,7 @@ public void testRuleName() {
/**
* This is here as the old way was to do this.
*/
- @Ignore
+ @Disabled
@Test
public void testInvalidRuleName() {
final String row = "RuleTable This is my rule name (type class)";
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParse2Test.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParse2Test.java
index 64f56d6cc17..cc98b5b43a4 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParse2Test.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParse2Test.java
@@ -22,7 +22,7 @@
import org.drools.template.model.Package;
import org.drools.template.parser.DataListener;
import org.drools.template.parser.DecisionTableParseException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatException;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseFromFileTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseFromFileTest.java
index 1857e5fed37..7dbbe642b7a 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseFromFileTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseFromFileTest.java
@@ -29,8 +29,8 @@
import org.drools.template.model.Package;
import org.drools.template.model.Rule;
import org.drools.template.parser.DecisionTableParseException;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@@ -180,7 +180,8 @@ public void testComplexWorksheetMissingConditionsInLocaleEnUs() throws Exception
}
}
- @Test @Ignore // TODO JBRULES-2880 TIRELLI: Ignore test while we decide what to do in order to solve i18n issues
+ @Disabled // TODO JBRULES-2880 TIRELLI: Ignore test while we decide what to do in order to solve i18n issues
+ @Test
public void testComplexWorksheetMissingConditionsInLocaleFrFr() throws Exception {
Locale originalDefaultLocale = Locale.getDefault();
Locale.setDefault(Locale.FRANCE);
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseLargeTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseLargeTest.java
index 5aa984eb3bb..de7a9edceaa 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseLargeTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/RuleWorksheetParseLargeTest.java
@@ -21,7 +21,7 @@
import java.io.InputStream;
import org.drools.template.model.Package;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvLineParserTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvLineParserTest.java
index 01cdff89842..66d1cd5e00b 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvLineParserTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvLineParserTest.java
@@ -20,7 +20,7 @@
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvParserTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvParserTest.java
index ff69bb3ad50..0c120756e3e 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvParserTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/csv/CsvParserTest.java
@@ -22,7 +22,7 @@
import java.util.Map;
import org.drools.template.parser.DataListener;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.drools.template.parser.DataListener.NON_MERGED;
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/xls/ExcelParserTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/xls/ExcelParserTest.java
index 90556d0615d..219db5752de 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/xls/ExcelParserTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/parser/xls/ExcelParserTest.java
@@ -29,8 +29,8 @@
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.drools.template.parser.DataListener;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
@@ -47,7 +47,7 @@ public class ExcelParserTest {
private Sheet sheet;
- @After
+ @AfterEach
public void tearDown() throws IOException {
if(workbook != null) {
workbook.close();
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiKieBaseTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiKieBaseTest.java
index 1deb04797a4..8d28fd985b8 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiKieBaseTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiKieBaseTest.java
@@ -18,8 +18,8 @@
*/
package org.drools.decisiontable.project;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
@@ -34,7 +34,7 @@ public class MultiKieBaseTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {
diff --git a/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiSheetsTest.java b/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiSheetsTest.java
index 0b44cf395b3..182f8c8afaf 100644
--- a/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiSheetsTest.java
+++ b/drools-decisiontables/src/test/java/org/drools/decisiontable/project/MultiSheetsTest.java
@@ -18,8 +18,6 @@
*/
package org.drools.decisiontable.project;
-import org.junit.After;
-import org.junit.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
@@ -28,13 +26,16 @@
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+
import static org.assertj.core.api.Assertions.assertThat;
public class MultiSheetsTest {
private KieSession ksession;
- @After
+ @AfterEach
public void tearDown() {
if (ksession != null) {