From: Steve F. <sm...@us...> - 2002-10-21 22:55:11
|
Update of /cvsroot/mockobjects/mockobjects-java/src/jdk/1.4/test/mockobjects In directory usw-pr-cvs1:/tmp/cvs-serv14997/src/jdk/1.4/test/mockobjects Added Files: Test_Matches.java Log Message: added 1.4-specific dynamic class and test --- NEW FILE: Test_Matches.java --- /* * Date: 21-Oct-2002 */ package test.mockobjects; import com.mockobjects.dynamic.Matches; import com.mockobjects.dynamic.Predicate; import junit.framework.TestCase; public class Test_Matches extends TestCase { public Test_Matches(String name) { super(name); } public void testMatches() { Predicate p = new Matches("^hello, (.*)\\.$"); assertTrue(p.eval("hello, world.")); assertTrue(p.eval("hello, mum.")); assertTrue(!p.eval("hello world.")); assertTrue(!p.eval("hello, world")); assertTrue(!p.eval("goodbye, world.")); } } |