yu199195 commented on code in PR #3273:
URL: https://github.com/apache/incubator-shenyu/pull/3273#discussion_r852550075
##########
shenyu-plugin/shenyu-plugin-base/src/test/java/org/apache/shenyu/plugin/base/condition/judge/PredicateJudgeFactoryTest.java:
##########
@@ -123,4 +128,42 @@ public void testContainsJudge() {
assertFalse(PredicateJudgeFactory.judge(conditionData, "/http1/**"));
}
+ @Test
+ public void testStartsJudge() {
+ conditionData.setOperator(OperatorEnum.STARTS_WITH.getAlias());
+ assertTrue(PredicateJudgeFactory.judge(conditionData,
"/http/**/test"));
+ assertFalse(PredicateJudgeFactory.judge(conditionData,
"/test/http/**"));
+ assertFalse(PredicateJudgeFactory.judge(conditionData, "/http1/**"));
+ }
+
+ @Test
+ public void testEndsJudge() {
+ conditionData.setOperator(OperatorEnum.ENDS_WITH.getAlias());
+ assertTrue(PredicateJudgeFactory.judge(conditionData,
"/**/test/http/"));
+ assertFalse(PredicateJudgeFactory.judge(conditionData,
"/test/http/**"));
+ assertFalse(PredicateJudgeFactory.judge(conditionData, "/**/http1/"));
+ }
+
+ @Test
+ public void comparePerformance() {
Review Comment:
remove this
--
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]