예제 #1
0
  @Test
  public void parseLogStatement_ERROR() {
    LogStatement log = lineParser.parseLogStatement(ERROR_LOG);

    assertNotNull(log);
    assertEquals(Level.ERROR, log.getLevel());
    // TODO finish testSimpleInfoWithException
  }
예제 #2
0
  @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());
  }
예제 #3
0
 @Before
 public void setup() {
   currentLogStatement = mock(LogStatement.class);
   when(currentLogStatement.hasCausedBy()).thenReturn(true);
 }