gitgabrio commented on code in PR #5884:
URL:
https://github.com/apache/incubator-kie-drools/pull/5884#discussion_r1590699360
##########
drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/MiscDRLParserTest.java:
##########
@@ -4090,6 +4092,28 @@ void ooPathMixedWithStandardConstraint() {
.isEqualToIgnoringWhitespace("/wife[$age : age] && age >
$age");
}
+ @Test
+ void ooPathLhsPattern() {
+ final String text = "package org.drools\n"
+ + "rule PlainNot when\n"
+ + " not( /strings [ this == \"It Does Work\" ] )\n"
+ + "then\n"
+ + "end\n";
+ PackageDescr packageDescr = parseAndGetPackageDescr(text);
+ RuleDescr ruleDescr = packageDescr.getRules().get(0);
+
assertThat(ruleDescr.getLhs().getDescrs().get(0)).isInstanceOfSatisfying(NotDescr.class,
notDescr -> {
Review Comment:
HI @yurloc
out of curiosity:
1. what will be the printed message in case of failure in some of those
nested assertions ?
2. IINW, this test verify only the positive case (i.e. it must not fails):
is there a "negative" test to verify the behavior in case of "wrong" situations
(this is a theoretical POV question, not sure if it make sense in that
context) ?
Pls notice the above questions are not strictly related to this test, just a
general observation
--
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]