void (String uri, String localName, String qName) { final String currentText = StringUtil.unescapeXmlEntities(currentValue.toString()); currentValue.setLength(0); if (TESTSUITE.equals(qName)) { myProcessor.onSuiteFinished(new TestSuiteFinishedEvent(mySuites.pop())); } else if (TESTCASE.equals(qName)) { if (myStatus != null) { if (myStatus.equals(TestResultsXmlFormatter.STATUS_ERROR) || myStatus.equals(TestResultsXmlFormatter.STATUS_FAILED)) { myProcessor.onTestFailure( new TestFailedEvent(myCurrentTest, "", currentText, myStatus.equals(TestResultsXmlFormatter.STATUS_ERROR), null, null)); } else if (myStatus.equals(TestResultsXmlFormatter.STATUS_IGNORED) || myStatus.equals(TestResultsXmlFormatter.STATUS_SKIPPED)) { myProcessor.onTestIgnored(new TestIgnoredEvent(myCurrentTest, "", currentText)); } else { throw new IllegalStateException("Unknown status: " + myStatus); } } long time; try { time = (long)(1000 * Float.parseFloat(myDuration)); } catch (NumberFormatException e) { time = -1; } myProcessor.onTestFinished(new TestFinishedEvent(myCurrentTest, time)); myCurrentTest = null; } else if ((ERR.equals(qName) || OUT.equals(qName)) && !StringUtil.isEmpty(currentText)) { if (myCurrentTest != null) { myProcessor.onTestOutput(new TestOutputEvent(myCurrentTest, currentText, !myErrorOutput)); } else { myProcessor.onUncapturedOutput(currentText, myErrorOutput ? ProcessOutputTypes.STDERR : ProcessOutputTypes.STDOUT); } } }