fjtirado commented on code in PR #3713:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3713#discussion_r1795329305
##########
kogito-serverless-workflow/kogito-jsonpath-expression/src/test/java/org/kie/kogito/expr/jsonpath/JsonPathExpressionHandlerTest.java:
##########
@@ -230,14 +230,16 @@ void testWorkflowPropertyFromJsonAccessible() {
@MethodSource("provideMagicWordExpressionsToTest")
void testMagicWordsExpressions(String expression, String expectedResult,
KogitoProcessContext context) {
Expression parsedExpression = ExpressionHandlerFactory.get("jsonpath",
expression);
- assertThat(parsedExpression.isValid()).isTrue();
+ assertThat(parsedExpression.isValid()).overridingErrorMessage(() ->
parsedExpression.validationError().getMessage()).isTrue();
assertThat(parsedExpression.eval(getObjectNode(), String.class,
context)).isEqualTo(expectedResult);
}
private static Stream<Arguments> provideMagicWordExpressionsToTest() {
return Stream.of(
Arguments.of("$WORKFLOW.instanceId", "1111-2222-3333",
getContext()),
Arguments.of("$SECRET.lettersonly", "secretlettersonly",
getContext()),
+ Arguments.of("$SECRET.lettersonly$SECRET.lettersonly",
"secretlettersonlysecretlettersonly", getContext()),
+ Arguments.of("$.propertyString$.propertyNum", "string12",
getContext()),
Review Comment:
you are right, but this can be interpreted as comparing concatenation of
magic words with "regular" contatenation
--
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]