コード例 #1
0
 protected void assertSelector(MockMessage message, String text, boolean expected)
     throws FilterException {
   BooleanExpression selector = SelectorParser.parse(text);
   Assert.assertTrue("Created a valid selector", selector != null);
   boolean value = selector.matches(message);
   Assert.assertEquals("Selector for: " + text, expected, value);
 }
コード例 #2
0
 protected void assertInvalidSelector(MockMessage message, String text) {
   try {
     SelectorParser.parse(text);
     Assert.fail("Created a valid selector");
   } catch (FilterException e) {
   }
 }