@Test public void testVerifyWhenMatchedWithExceptionBeingLogged() throws Throwable { String expected = generateRandomString(); LOG.error(expected, new IOException("Fake Exception")); expectedLogs.verifyError(expected); }
@Test public void testVerifyWhenMatchedPartially() throws Throwable { String expected = generateRandomString(); LOG.error("Extra stuff around expected " + expected + " blah"); expectedLogs.verifyError(expected); }
@Test public void testVerifyWhenMatchedFully() throws Throwable { String expected = generateRandomString(); LOG.error(expected); expectedLogs.verifyError(expected); }
@Test(expected = AssertionError.class) public void testVerifyWhenNotMatched() throws Throwable { String expected = generateRandomString(); expectedLogs.verifyError(expected); }
unknownJobMessage)); expectedLogs.verifyError("ERRORERROR"); expectedLogs.verifyError(errorTime.toString()); expectedLogs.verifyWarn("WARNINGWARNING"); expectedLogs.verifyWarn(warningTime.toString());