1 15 package org.apache.hivemind.test; 16 17 import org.apache.hivemind.ApplicationRuntimeException; 18 19 25 public class TestRegexpMatcher extends HiveMindTestCase 26 { 27 public void testMatching() 28 { 29 RegexpMatcher m = new RegexpMatcher(); 30 31 assertEquals(true, m.compareArguments("f.*bar", "foobar")); 32 assertEquals(false, m.compareArguments("zip.*zap", "zoop")); 33 } 34 35 public void testBadPattern() 36 { 37 RegexpMatcher m = new RegexpMatcher(); 38 39 try 40 { 41 m.compareArguments("[missing", "foobar"); 42 unreachable(); 43 } 44 catch (ApplicationRuntimeException ex) 45 { 46 } 48 } 49 } | Popular Tags |