tkobayas commented on code in PR #5837:
URL:
https://github.com/apache/incubator-kie-drools/pull/5837#discussion_r1565187681
##########
drools-model/drools-canonical-model/src/test/java/org/drools/model/operators/MatchesOperatorTest.java:
##########
@@ -0,0 +1,23 @@
+package org.drools.model.operators;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+
+public class MatchesOperatorTest {
+ @Test
+ public void testMatchesOperator() {
+ MatchesOperator instance = MatchesOperator.INSTANCE;
+ // Regular expression is second parameter
+ assertThat(instance.eval("a","a")).isTrue();
+ assertThat(instance.eval("a","b")).isFalse();
+ assertThat(instance.eval("a","a")).isTrue();
Review Comment:
@JaredDavis22 Thanks. Yes, having test purpose methods is good to manage
such static field conditions. Furthermore, you can make `forceCacheSize` and
`reInitialize` package private (removing `public`) because `MatchesOperator`
and `MatchesOperatorTest` are in the same package.
--
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]