@Test public void parseLogStatement_ERROR() { LogStatement log = lineParser.parseLogStatement(ERROR_LOG); assertNotNull(log); assertEquals(Level.ERROR, log.getLevel()); // TODO finish testSimpleInfoWithException }
@Test public void parseLogStatement_INFO() { LogStatement log = lineParser.parseLogStatement(INFO_LOG); assertEquals(LocalTime.of(1, 55, 16), log.getTime()); assertEquals(Level.INFO, log.getLevel()); assertEquals(new Clazz("com.web.seam.action.AuthenticatorImpl"), log.getClazz()); assertEquals("Login successfull for user: [email protected]", log.getMessage()); }
@Before public void setup() { currentLogStatement = mock(LogStatement.class); when(currentLogStatement.hasCausedBy()).thenReturn(true); }