import java.io.IOException;\r
import java.util.List;\r
\r
+import org.argeo.slc.core.structure.StructureAware;\r
+import org.argeo.slc.core.structure.StructureElement;\r
+import org.argeo.slc.core.structure.StructurePath;\r
+import org.argeo.slc.core.structure.StructureRegistry;\r
import org.argeo.slc.core.structure.tree.TreeSPath;\r
import org.argeo.slc.core.test.SimpleResultPart;\r
import org.argeo.slc.core.test.TestReport;\r
import org.argeo.slc.core.test.TestResultPart;\r
import org.argeo.slc.dao.test.TestResultDao;\r
\r
-public class FullHtmlTreeReport implements TestReport {\r
+public class FullHtmlTreeReport implements TestReport, StructureAware {\r
private TestResultDao testResultDao;\r
private File reportDir;\r
\r
+ private StructureRegistry registry;\r
+\r
public void generateTestReport(TestResult testResult) {\r
if (testResultDao == null) {\r
TreeTestResult result = (TreeTestResult) testResult;\r
\r
buf.append("<table border=1>\n");\r
for (TreeSPath path : result.getResultParts().keySet()) {\r
- buf.append("<tr><td>").append(path).append("</td>\n");\r
+ buf.append("<tr><td>");\r
+ buf.append(path);\r
+ StructureElement element = registry.getElement(path);\r
+ if (registry != null) {\r
+ if (element != null) {\r
+ buf.append("<br/><b>");\r
+ buf.append(element.getDescription());\r
+ buf.append("</b>");\r
+ }\r
+ }\r
+ buf.append("</td>\n");\r
buf.append("<td>");\r
PartSubList subList = (PartSubList) result.getResultParts().get(\r
path);\r
this.reportDir = reportDir;\r
}\r
\r
+ public void notifyCurrentPath(StructureRegistry registry, StructurePath path) {\r
+ this.registry = registry;\r
+ }\r
+\r
}\r