]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc/src/main/java/org/argeo/slc/ant/test/SlcCloseTestResultTask.java
694bd5b4c968e599f5f6019fa4f10cee3a0259f4
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 closing a given result, and optionally generating a report. */
10 public class SlcCloseTestResultTask
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
= (TestResult
) getContext().getBean(result
);
21 TestReport testReport
= (TestReport
) getContext().getBean(
23 if (testReport
instanceof StructureAware
) {
24 ((StructureAware
) testReport
).notifyCurrentPath(
27 testReport
.generateTestReport(testResult
);
32 /** Sets the bean name of the result to close. */
33 public void setResult(String bean
) {
37 /** Sets the bean name of the report to generate. */
38 public void setReport(String report
) {