package doc.test; import java.util.ArrayList; import doc.bo.Document; import doc.bo.DocumentSearcher; import junit.framework.TestCase; /** * Test class of the DocumentSearcher * @author Michael Glatter-Götz *
* ID date description * michael 02.10.2006 creation ***/ public class TestDocumentSearcher extends TestCase { /** * Constructor of the TestDocumentSearcher class * @param sTitle Title of the Document **/ public TestDocumentSearcher(String sTitle) { super(sTitle); } /** * Tests if the findAll method of the DocumentSearcher returns five documents **/ public void testFindAll() { DocumentSearcher oCarSearcher = new DocumentSearcher(); ArrayList aoCars = null; aoCars = oCarSearcher.findAll(); assertTrue("findAll-Methode liefert nicht fünf Dokumente", aoCars.size() == 5); } /** * Tests if the findByAuthor method works correctly **/ public void testFindByAuthor() { DocumentSearcher oDocumentSearcher = new DocumentSearcher(); ArrayList