Java Doc for SelfTestCase.java in  » Web-Crawler » heritrix » org » archive » crawler » selftest » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Crawler » heritrix » org.archive.crawler.selftest 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.archive.crawler.selftest.SelfTestCase

All known Subclasses:   org.archive.crawler.selftest.CheckpointSelfTest,  org.archive.crawler.selftest.AuthSelfTest,  org.archive.crawler.selftest.CharsetSelfTest,  org.archive.crawler.selftest.MaxLinkHopsSelfTest,  org.archive.crawler.selftest.FramesSelfTestCase,  org.archive.crawler.selftest.BadURIsStopPageParsingSelfTest,  org.archive.crawler.selftest.BackgroundImageExtractionSelfTestCase,  org.archive.crawler.selftest.FlashParseSelfTest,
SelfTestCase
abstract public class SelfTestCase extends TestCase (Code)
Base class for integrated selftest unit tests. Has utility for integrated selftest such as location of selftest generated arc file.
author:
   stack
version:
   $Id: SelfTestCase.java 4931 2007-02-21 18:48:17Z gojomo $


Field Summary
final protected static  StringSELFTEST
     Suffix for selftest classes.

Constructor Summary
public  SelfTestCase()
    
public  SelfTestCase(String testName)
    

Method Summary
protected static  voidassertExists(File file)
     Test nonull and exits.
Parameters:
  file - File to test.
public  voidassertInitialized()
    
protected static  voidassertNonEmpty(String str)
     Test non null and not empty.
Parameters:
  str - String to test.
public  booleanfileExists(File file)
     Confirm passed file exists on disk under the test directory. This method takes care of building up the file path under the selftest webapp.
public  booleanfilesExist(List files)
     Confirm passed files exist on disk under the test directory.
Parameters:
  files - Files to test for existence under the test's directory.
protected  List<File>filesFoundInArc()
     Find all files that belong to this test that are mentioned in the arc.
protected static  File[]getArcFiles()
    
public static  CrawlJobgetCrawlJob()
    
protected static  FilegetCrawlJobDir()
    
public static  FilegetHtdocs()
    
protected static  FilegetLogsDir()
    
protected static  List[]getMetaDatas()
    
protected static  ARCReader[]getReadReaders()
     Returns the selftest read ARCReader. The returned ARCReader has been validated.
public static  StringgetSelftestURL()
    
public static  StringgetSelftestURLWithTrailingSlash()
     Returns the selftestURL.
public  StringgetTestName()
     Calculates test name by stripping SelfTest from current class name.
public static synchronized  voidinitialize(String url, CrawlJob job, File jobDir, File docs)
     Static initializer. Must be called before instantiation of any tests based off this class.
Parameters:
  url - URL to selftest webapp.
Parameters:
  job - The selftest crawl job.
Parameters:
  jobDir - Job output directory.
public  voidtestFilesInArc(List<File> files)
     Test passed list were all found in the arc. If more or less found, test fails.
Parameters:
  files - List of files to find in the arc.
public  voidtestFilesInArc(List<File> files, List<File> foundFiles)
     Test passed list were all found in the arc. If more or less found, test fails.
Parameters:
  files - List of files to find in the arc.
public  voidtestNothing()
    

Field Detail
SELFTEST
final protected static String SELFTEST(Code)
Suffix for selftest classes.




Constructor Detail
SelfTestCase
public SelfTestCase()(Code)



SelfTestCase
public SelfTestCase(String testName)(Code)




Method Detail
assertExists
protected static void assertExists(File file)(Code)
Test nonull and exits.
Parameters:
  file - File to test. Passed file.
throws:
  FileNotFoundException - passed file doesn't exist.



assertInitialized
public void assertInitialized()(Code)



assertNonEmpty
protected static void assertNonEmpty(String str)(Code)
Test non null and not empty.
Parameters:
  str - String to test. The passed string.
throws:
  IllegalArgumentException - if null or empty string.



fileExists
public boolean fileExists(File file)(Code)
Confirm passed file exists on disk under the test directory. This method takes care of building up the file path under the selftest webapp. Just pass the file name.
Parameters:
  file - Name of file to look for. True if file exists.



filesExist
public boolean filesExist(List files)(Code)
Confirm passed files exist on disk under the test directory.
Parameters:
  files - Files to test for existence under the test's directory. true if all files exist on disk.



filesFoundInArc
protected List<File> filesFoundInArc()(Code)
Find all files that belong to this test that are mentioned in the arc. List of unique found file File objects.



getArcFiles
protected static File[] getArcFiles()(Code)
Returns the arcDir.



getCrawlJob
public static CrawlJob getCrawlJob()(Code)
Returns the crawlJob.



getCrawlJobDir
protected static File getCrawlJobDir()(Code)
Returns the jobDir.



getHtdocs
public static File getHtdocs()(Code)
Returns the selftest webappDir.



getLogsDir
protected static File getLogsDir()(Code)
Return the directory w/ logs in it.



getMetaDatas
protected static List[] getMetaDatas()(Code)
Returns list of ARCReader metadatas, the byproduct of callingvalidate.



getReadReaders
protected static ARCReader[] getReadReaders()(Code)
Returns the selftest read ARCReader. The returned ARCReader has been validated. Use it to get at metadata. Returns the readReader, an ARCReader that has been validated.



getSelftestURL
public static String getSelftestURL()(Code)
Returns the selftestURL.



getSelftestURLWithTrailingSlash
public static String getSelftestURLWithTrailingSlash()(Code)
Returns the selftestURL. URL returned is guaranteed to havea trailing '/'.



getTestName
public String getTestName()(Code)
Calculates test name by stripping SelfTest from current class name. The name of the test.



initialize
public static synchronized void initialize(String url, CrawlJob job, File jobDir, File docs) throws IOException, AttributeNotFoundException, MBeanException, ReflectionException, InterruptedException(Code)
Static initializer. Must be called before instantiation of any tests based off this class.
Parameters:
  url - URL to selftest webapp.
Parameters:
  job - The selftest crawl job.
Parameters:
  jobDir - Job output directory. Has the seed file, the order fileand logs.
Parameters:
  docs - Expanded webapp directory location.
throws:
  IOException - if nonexistent directories passed.



testFilesInArc
public void testFilesInArc(List<File> files)(Code)
Test passed list were all found in the arc. If more or less found, test fails.
Parameters:
  files - List of files to find in the arc. No other files but theseshould be found in the arc.



testFilesInArc
public void testFilesInArc(List<File> files, List<File> foundFiles)(Code)
Test passed list were all found in the arc. If more or less found, test fails.
Parameters:
  files - List of files to find in the arc. No other files but theseshould be found in the arc.
Parameters:
  foundFiles - Files found in the arc.



testNothing
public void testNothing()(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.