Class LoggerReaderRule
- java.lang.Object
-
- org.silverpeas.core.test.integration.rule.LoggerReaderRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class LoggerReaderRule extends Object implements org.junit.rules.TestRule
This rule permits to get all the logs written during the execution of a test.It tries to take care of the server logging configuration about formatting. If the formatter can not be guessed, the
SimpleFormatter
is used by default.To get logs written during a test, just call
getReader()
method from the rule instance.- Author:
- silveryocha
-
-
Constructor Summary
Constructors Constructor Description LoggerReaderRule()
LoggerReaderRule(Level level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterEvaluate()
org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
protected void
beforeEvaluate()
Reader
getReader()
-
-
-
Constructor Detail
-
LoggerReaderRule
public LoggerReaderRule()
-
LoggerReaderRule
public LoggerReaderRule(Level level)
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
beforeEvaluate
protected void beforeEvaluate()
-
afterEvaluate
protected void afterEvaluate()
-
getReader
public Reader getReader()
-
-