예제 #1
0
  @Test
  public void testCausedByOnlyClass() {
    CausedBy causedBy = lineParser.parseCausedBy(CAUSED_BY_ONLY_CLASS, currentLogStatement);

    assertEquals(
        "javax.servlet.ServletException", causedBy.getExceptionClazz().getFullyQualifiedName());
    assertEquals("", causedBy.getMessage());
  }
예제 #2
0
  @Test
  public void parseCausedByWithException() {
    CausedBy causedBy = lineParser.parseCausedBy(CAUSED_BY_LONG, currentLogStatement);

    assertEquals(new Clazz("javax.faces.FacesException"), causedBy.getExceptionClazz());
    assertEquals(
        "#{facilityChooserAction.facilitySelected}: javax.ejb.EJBTransactionRolledbackException",
        causedBy.getMessage());
  }
예제 #3
0
  @Test
  public void testLongLineWithDoubleRegexPattern() {
    CausedBy causedBy =
        lineParser.parseCausedBy(CAUSED_BY_WITH_DOUBLE_PATTERN, currentLogStatement);

    assertEquals("javax.el.ELException", causedBy.getExceptionClazz().getFullyQualifiedName());
    assertEquals(
        "/incl/mainmenu.xhtml @10,260 rendered=\"#{identity.loggedIn and identity.hasRole(applicationService.showRoleId('ADMIN')) eq false}\": org.jboss.seam.RequiredException: @In attribute requires non-null value: applicationService.entityManager",
        causedBy.getMessage());
  }