jomarko commented on code in PR #2134:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/2134#discussion_r1822238439
##########
jitexecutor/jitexecutor-dmn/src/test/java/org/kie/kogito/jitexecutor/dmn/api/JITDMNResourceTest.java:
##########
@@ -106,16 +107,18 @@ void testjitdmnResultEndpointWithEvaluationHitIds()
throws JsonProcessingExcepti
.extract()
.asString();
JsonNode retrieved = MAPPER.readTree(response);
- ArrayNode evaluationHitIdsNode = (ArrayNode)
retrieved.get(EVALUATION_HIT_IDS_FIELD_NAME);
- Assertions.assertThat(evaluationHitIdsNode).hasSize(3)
- .anyMatch(node -> node.asText().equals(elseElementId))
- .anyMatch(node -> node.asText().equals(ruleId0))
- .anyMatch(node -> node.asText().equals(ruleId3));
+ ObjectNode evaluationHitIdsNode = (ObjectNode)
retrieved.get(EVALUATION_HIT_IDS_FIELD_NAME);
+ Assertions.assertThat(evaluationHitIdsNode).hasSize(3);
+ final Map<String, Integer> expectedEvaluationHitIds =
Map.of(elseElementId, 1, ruleId0, 1, ruleId3, 1);
Review Comment:
from junit point of view, it would be beneficial if we have different
numbers for particular ids. Not sure if my point is clear a little bit and what
would be the cost/effort to have a test like:
```
final Map<String, Integer> expectedEvaluationHitIds = Map.of(elseElementId,
1, ruleId0, 2, ruleId3, 3);
```
--
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]