@Test public void parseCausedBy() { CausedBy causedBy = lineParser.parseCausedBy(CAUSED_BY, currentLogStatement); assertEquals( new Clazz("javax.ejb.EJBTransactionRolledbackException"), causedBy.getExceptionClazz()); }
@Test public void testCausedByOnlyClass() { CausedBy causedBy = lineParser.parseCausedBy(CAUSED_BY_ONLY_CLASS, currentLogStatement); assertEquals( "javax.servlet.ServletException", causedBy.getExceptionClazz().getFullyQualifiedName()); assertEquals("", causedBy.getMessage()); }
@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()); }
@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()); }