Example #1
0
 @Test
 public void mustNotMatchWhenRegexIsValidAndThereIsNotAMatch() {
   assertFalse(Tools.regex("200", "404"));
 }
Example #2
0
 @Test(expected = IllegalArgumentException.class)
 public void mustNotMatchWhenRegexIsInvalidAndNotifyError() {
   Tools.regex("200", "40[]4");
   fail("Should have thrown IAE as expression is invalid");
 }
Example #3
0
 @Test
 public void mustMatchWhenRegexIsValidAndThereIsAMatch() {
   assertTrue(Tools.regex("200", "200"));
 }