Java Doc for TestHelper.java in  » Development » Monolog » org » objectweb » util » monolog » 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 » Development » Monolog » org.objectweb.util.monolog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.objectweb.util.monolog.TestHelper

All known Subclasses:   org.objectweb.util.monolog.TestLogger,  org.objectweb.util.monolog.TestConfigurability,  org.objectweb.util.monolog.TestPw2Logger,  org.objectweb.util.monolog.log4j.TestPattern,  org.objectweb.util.monolog.file.monolog.TestPropertiesConfAccess,  org.objectweb.util.monolog.TestIntermediateLevel,  org.objectweb.util.monolog.TestAdditivity,
TestHelper
public class TestHelper extends TestCase (Code)
This class is test helper which provides tool methods to check a log file. It extends TestCase to support the use with JUnit.
author:
   Sebastien Chassande-Barrioz


Field Summary
final public static  String[]SETTER_METHODS
     This constant field contains the list of the setter name needed to initialize this class.
static  booleandebug
    
protected  StringfileName
     The default file name specify by a setter method.
public static  HandlerFactoryhf
    
public static  LevelFactorylef
    
public static  LoggerFactorylf
    

Constructor Summary
public  TestHelper()
    
public  TestHelper(String s)
    

Method Summary
public  voidassertInFileEquals(String message, String required)
     It checks that the last line of the default log file is equals to a specified string.
public  voidassertInFileEquals(String message, String filename, String required)
     It checks that the last line of the specified log file is equals to a specified string.
public  voidassertInFileEquals(String message, String[] required)
     It checks that the last lines of the default log file is equals to a specified string string.
public  voidassertInFileEquals(String message, String filename, String[] required)
     It checks that the last lines of the specified log file is equals to a specified string string.
protected  voiddebug(String m)
     This methods is used to debug this helper.
public  String[]getFirstLines(int linenumber)
     Return the last lines of the default log file.
Parameters:
  linenumber - is the number of line which must be retrieved.
public  String[]getFirstLines(String filename, int linenumber)
     Return the first lines of the specified log file.
public  String[]getLastLines(int linenumber)
     Return the last lines of the default log file.
Parameters:
  linenumber - is the number of line which must be retrieved.
public  String[]getLastLines(String filename, int linenumber)
     Return the last lines of the specified log file.
public static  TestSuitegetTestSuite(Class c, String[] methods, String params, String lfcn, String fn)
     It retrieves a test suite.
public static  TestSuitegetTestSuite(Class c, String[] methods, String params, String lfcn)
    
public static  voidmain(String[] args)
    
public  voidquietRootLogger()
     It removes all handlers of the root logger.
public static  voidrun(Class c, String[] methods, String params, String lfcn, String fn)
     It runs the test.
public static  voidrun(Class c, String[] methods, String params, String lfcn)
     It runs the test.
public  voidsetLoggerFactoryClassName(String lfcn)
     It assigns the LoggerFactory class name.
public  voidsetOutputFile(String filename)
     It assigns the default log file name.
protected  voidsetUp()
    

Field Detail
SETTER_METHODS
final public static String[] SETTER_METHODS(Code)
This constant field contains the list of the setter name needed to initialize this class.



debug
static boolean debug(Code)



fileName
protected String fileName(Code)
The default file name specify by a setter method.



hf
public static HandlerFactory hf(Code)
The handler factory used during the test



lef
public static LevelFactory lef(Code)
The level factory used during the test



lf
public static LoggerFactory lf(Code)
The Logger factory used during the test




Constructor Detail
TestHelper
public TestHelper()(Code)



TestHelper
public TestHelper(String s)(Code)




Method Detail
assertInFileEquals
public void assertInFileEquals(String message, String required)(Code)
It checks that the last line of the default log file is equals to a specified string.
Parameters:
  message - is the error message if the string is not found.
Parameters:
  required - is the string which must be file in the default log file



assertInFileEquals
public void assertInFileEquals(String message, String filename, String required)(Code)
It checks that the last line of the specified log file is equals to a specified string.
Parameters:
  message - is the error message if the string is not found.
Parameters:
  filename - is the log file name
Parameters:
  required - is the string which must be file in the default log file



assertInFileEquals
public void assertInFileEquals(String message, String[] required)(Code)
It checks that the last lines of the default log file is equals to a specified string string.
Parameters:
  message - is the error message if the string array is not found.
Parameters:
  required - is the string array which must be file in the defaultlog file.



assertInFileEquals
public void assertInFileEquals(String message, String filename, String[] required)(Code)
It checks that the last lines of the specified log file is equals to a specified string string.
Parameters:
  message - is the error message if the string array is not found.
Parameters:
  filename - is the log file name
Parameters:
  required - is the string array which must be file in the defaultlog file.



debug
protected void debug(String m)(Code)
This methods is used to debug this helper.



getFirstLines
public String[] getFirstLines(int linenumber)(Code)
Return the last lines of the default log file.
Parameters:
  linenumber - is the number of line which must be retrieved. a string array which matches to the last line.



getFirstLines
public String[] getFirstLines(String filename, int linenumber)(Code)
Return the first lines of the specified log file.
Parameters:
  linenumber - is the number of line which must be retrieved.
Parameters:
  filename - is the log file name a string array which matches to the last line.



getLastLines
public String[] getLastLines(int linenumber)(Code)
Return the last lines of the default log file.
Parameters:
  linenumber - is the number of line which must be retrieved. a string array which matches to the last line.



getLastLines
public String[] getLastLines(String filename, int linenumber)(Code)
Return the last lines of the specified log file.
Parameters:
  linenumber - is the number of line which must be retrieved.
Parameters:
  filename - is the log file name a string array which matches to the last line.



getTestSuite
public static TestSuite getTestSuite(Class c, String[] methods, String params, String lfcn, String fn)(Code)
It retrieves a test suite.



getTestSuite
public static TestSuite getTestSuite(Class c, String[] methods, String params, String lfcn)(Code)



main
public static void main(String[] args)(Code)



quietRootLogger
public void quietRootLogger()(Code)
It removes all handlers of the root logger.



run
public static void run(Class c, String[] methods, String params, String lfcn, String fn)(Code)
It runs the test.



run
public static void run(Class c, String[] methods, String params, String lfcn)(Code)
It runs the test.



setLoggerFactoryClassName
public void setLoggerFactoryClassName(String lfcn)(Code)
It assigns the LoggerFactory class name. This method tries to get an instance with this class name.



setOutputFile
public void setOutputFile(String filename)(Code)
It assigns the default log file name.



setUp
protected void setUp() throws Exception(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.