yesamer commented on code in PR #5883:
URL:
https://github.com/apache/incubator-kie-drools/pull/5883#discussion_r1590758975
##########
kie-dmn/kie-dmn-core/pom.xml:
##########
@@ -156,13 +156,13 @@
<artifactId>pmml-model</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
Review Comment:
Formatting
##########
kie-dmn/kie-dmn-backend/pom.xml:
##########
@@ -61,24 +61,22 @@
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
Review Comment:
Optional: formatting
##########
kie-dmn/kie-dmn-core-jsr223-jq/src/test/java/org/kie/dmn/core/jsr223/jq/BasicTest.java:
##########
@@ -33,40 +33,40 @@
import static org.assertj.core.api.Assertions.assertThat;
-public class BasicTest {
+class BasicTest {
private static final Logger LOG = LoggerFactory.getLogger( BasicTest.class
);
private static final ScriptEngineManager SEMANAGER = new
ScriptEngineManager();
private ScriptEngine engine;
@BeforeEach
- public void init() {
+ void init() {
engine = SEMANAGER.getEngineByName("jq");
}
-
+
@Test
- public void testEval() throws ScriptException {
+ void eval() throws ScriptException {
Map<String, Object> ctx = new HashMap<>();
ctx.put("a", 1);
ctx.put("b", 2);
Object result = engine.eval(" .a + .b ", new SimpleBindings( ctx ));
LOG.info("{}", result);
assertThat(result).asString().isEqualTo("3");
}
-
+
@Test
- public void testEvalJSONKey() throws ScriptException {
+ void evalJSONKey() throws ScriptException {
Map<String, Object> ctx = new HashMap<>();
ctx.put("Age", 1);
ctx.put("Previous incidents?", false);
Object result = engine.eval(" .\"Previous incidents?\" ", new
SimpleBindings( ctx ));
LOG.info("{}", result);
assertThat(result).isEqualTo(false);
}
-
+
@Test
- public void testTest() throws ScriptException {
Review Comment:
xD
##########
kie-dmn/kie-dmn-core/pom.xml:
##########
@@ -156,13 +156,13 @@
<artifactId>pmml-model</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
+ <artifactId>mockito-junit-jupiter</artifactId>
Review Comment:
Formatting
##########
kie-dmn/kie-dmn-backend/src/test/java/org/kie/dmn/backend/marshalling/v1_1/UnmarshalMarshalTest.java:
##########
@@ -63,99 +63,99 @@ public class UnmarshalMarshalTest {
protected static final Logger LOG =
LoggerFactory.getLogger(UnmarshalMarshalTest.class);
@Test
- public void test0001() throws Exception {
+ void test0001() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0001-input-data-string.dmn");
}
@Test
- public void test0002() throws Exception {
+ void test0002() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0002-input-data-number.dmn");
}
@Test
- public void test0003() throws Exception {
+ void test0003() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0003-input-data-string-allowed-values.dmn");
}
@Test
- public void test0004() throws Exception {
+ void test0004() throws Exception {
DMNMarshaller marshaller =
DMNMarshallerFactory.newMarshallerWithExtensions(List.of(new
DecisionServicesExtensionRegister()));
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0004-decision-services.dmn", marshaller);
}
@Test
- public void test0004_ns_other_location() throws Exception {
+ void test0004_ns_other_location() throws Exception {
DMNMarshaller marshaller =
DMNMarshallerFactory.newMarshallerWithExtensions(List.of(new
DecisionServicesExtensionRegister()));
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0004-decision-services_ns_other_location.dmn", marshaller);
}
@Test
- public void test0005_decision_list() throws Exception {
+ void test0005_decision_list() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"0005-decision-list.dmn");
}
@Test
- public void test_hardcoded_java_max_call() throws Exception {
+ void hardcoded_java_max_call() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"hardcoded-java-max-call.dmn");
}
@Test
- public void testDish() throws Exception {
+ void dish() throws Exception {
testRoundTrip("org/kie/dmn/backend/marshalling/v1_1/",
"dish-decision.xml");
}
- @Ignore("failing to compare over a xsi:type=\"tImport\" attribute, but why
content generated 'control' need to explicit it ?")
+ @Disabled("failing to compare over a xsi:type=\"tImport\" attribute, but
why content generated 'control' need to explicit it ?")
Review Comment:
Unrelated to this change...But I'm wondering if makes sense to create a new
ticket that requires to review of all the disabled tests we have and decide if
they deserve a fix or if they should be removed, WDYT?
##########
kie-dmn/kie-dmn-core/pom.xml:
##########
@@ -202,6 +202,11 @@
<artifactId>yasson</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
Review Comment:
Formatting
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]