]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc/src/main/java/org/argeo/slc/ant/test/SlcReportTask.java
1 package org
.argeo
.slc
.ant
.test
;
3 import org
.argeo
.slc
.ant
.structure
.SAwareTask
;
4 import org
.argeo
.slc
.core
.structure
.StructureAware
;
5 import org
.argeo
.slc
.core
.structure
.StructureRegistry
;
6 import org
.argeo
.slc
.core
.test
.TestReport
;
7 import org
.argeo
.slc
.core
.test
.TestResult
;
9 /** Ant tasks generating a report. */
10 public class SlcReportTask
extends SAwareTask
{
11 private String result
;
12 private String report
;
15 public void executeActions(String mode
) {
16 if (!mode
.equals(StructureRegistry
.READ
)) {
17 TestResult testResult
= null;
19 testResult
= (TestResult
) getContext().getBean(result
);
21 TestReport testReport
= (TestReport
) getContext().getBean(report
);
22 if (testReport
instanceof StructureAware
) {
23 ((StructureAware
) testReport
).notifyCurrentPath(getRegistry(),
26 testReport
.generateTestReport(testResult
);
30 /** Sets the bean name of the result to close. */
31 public void setResult(String bean
) {
35 /** Sets the bean name of the report to generate. */
36 public void setReport(String report
) {