}
return root.more;
}
private Parse buildCells(OSGiTestResult testResult) {
Parse root = new Parse(null, null, null, null);
Parse next = root;
if (testResult.isInfo()) {
next = next.more = new Parse("td", "Test Case", null, null);
next = next.more = new Parse("td", escape(testResult.getMessage()), null, null);
next = next.more = new Parse("td", escape(testResult.getDescription()), null, null);
next = next.more = new Parse("td", " ", null, null);
} else {
if (testResult.hasPassed()) {
next = next.more = new Parse("td", "Pass", null, null);
right(next);
} else if (testResult.hasFailed()) {
next = next.more = new Parse("td", "Fail", null, null);
wrong(next);
} else if (testResult.hasErrored()) {
next = next.more = new Parse("td", "Error", null, null);
exception(next, testResult.getThrowable());
}
String testName = testResult.getMethodName();
next = next.more = new Parse("td", testName, null, null);
if (testResult.getDescription().equals("")) {
next = next.more = new Parse("td", " ", null, null);
} else {
next = next.more = new Parse("td", escape(testResult.getDescription()), null, null);
}
if (!testResult.hasPassed()) {
next = next.more = new Parse("td", escape(testResult.getMessage()), null, null);
} else {
next = next.more = new Parse("td", " ", null, null);
}
}
return root.more;
}