public class LogAssertionTestRule extends AbstractTestRule<List<LogCapture>,List<LogCapture>>
Modifier and Type | Field and Description |
---|---|
static LogAssertionTestRule |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
afterClass(org.junit.runner.Description description,
List<LogCapture> logCaptures) |
void |
afterMethod(org.junit.runner.Description description,
List<LogCapture> logCaptures,
Object target) |
List<LogCapture> |
beforeClass(org.junit.runner.Description description) |
List<LogCapture> |
beforeMethod(org.junit.runner.Description description,
Object target) |
static void |
caughtFailure(Error error) |
static void |
endAssert(List<ExpectedLogs> expectedLogsList,
List<LogCapture> logCaptures) |
protected static void |
installJdk14Handler() |
protected static void |
installLog4jAppender() |
protected static boolean |
isExpected(List<ExpectedLogs> expectedLogsList,
String renderedMessage) |
static List<LogCapture> |
startAssert(List<ExpectedLogs> expectedLogsList) |
protected static void |
uninstallJdk14Handler() |
protected static void |
uninstallLog4jAppender() |
apply, createClassStatement, createMethodStatement
public static final LogAssertionTestRule INSTANCE
public static void caughtFailure(Error error)
public static void endAssert(List<ExpectedLogs> expectedLogsList, List<LogCapture> logCaptures)
public static List<LogCapture> startAssert(List<ExpectedLogs> expectedLogsList)
public void afterClass(org.junit.runner.Description description, List<LogCapture> logCaptures)
afterClass
in class AbstractTestRule<List<LogCapture>,List<LogCapture>>
public void afterMethod(org.junit.runner.Description description, List<LogCapture> logCaptures, Object target)
afterMethod
in class AbstractTestRule<List<LogCapture>,List<LogCapture>>
public List<LogCapture> beforeClass(org.junit.runner.Description description)
beforeClass
in class AbstractTestRule<List<LogCapture>,List<LogCapture>>
public List<LogCapture> beforeMethod(org.junit.runner.Description description, Object target)
beforeMethod
in class AbstractTestRule<List<LogCapture>,List<LogCapture>>
protected static void installJdk14Handler()
protected static void installLog4jAppender()
protected static boolean isExpected(List<ExpectedLogs> expectedLogsList, String renderedMessage)
protected static void uninstallJdk14Handler()
protected static void uninstallLog4jAppender()