From: Steve F. <sm...@us...> - 2002-08-04 01:41:51
|
Update of /cvsroot/mockobjects/no-stone-unturned/src/nostone/tests In directory usw-pr-cvs1:/tmp/cvs-serv30310/src/nostone/tests Modified Files: SearcherTest.java Log Message: More on GUI testing Index: SearcherTest.java =================================================================== RCS file: /cvsroot/mockobjects/no-stone-unturned/src/nostone/tests/SearcherTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SearcherTest.java 3 Aug 2002 22:22:59 -0000 1.2 +++ SearcherTest.java 4 Aug 2002 01:41:48 -0000 1.3 @@ -14,7 +14,11 @@ } public void testNoMatchesFound() { - Searcher searcher = new Searcher(new Directory() {}); + Searcher searcher = new Searcher(new Directory() { + public String lookFor(String searchString) { + return null; + } + }); assertEquals("Should be status", "", @@ -29,9 +33,11 @@ public void testOneMatchFound() { - Searcher searcher = new Searcher(new Directory() {}); - - // addSearchResult("One Result"); + Searcher searcher = new Searcher(new Directory() { + public String lookFor(String searchString) { + return "One Result"; + } + }); ((JButton)findNamedComponent(searcher, "search button")).doClick(); @@ -40,7 +46,7 @@ ((JTextArea)findNamedComponent(searcher, "results")).getText()); assertEquals("Should be status", "", - ((JLabel)findNamedComponent(searcher, "status")).getText()); + ((JLabel)findNamedComponent(searcher, "status")).getText().trim()); } |