1 package org
.argeo
.slc
.example
;
3 import org
.argeo
.slc
.core
.structure
.StructureAware
;
4 import org
.argeo
.slc
.core
.structure
.StructureElement
;
5 import org
.argeo
.slc
.core
.structure
.StructurePath
;
6 import org
.argeo
.slc
.core
.structure
.StructureRegistry
;
7 import org
.argeo
.slc
.core
.structure
.tree
.TreeSPath
;
8 import org
.argeo
.slc
.core
.test
.SimpleResultPart
;
9 import org
.argeo
.slc
.core
.test
.TestDefinition
;
10 import org
.argeo
.slc
.core
.test
.TestResult
;
11 import org
.argeo
.slc
.core
.test
.TestRun
;
13 public class ExampleTask
implements StructureAware
, TestDefinition
,
15 private TreeSPath path
;
16 private String description
;
18 public void execute(TestRun testRun
) {
19 SimpleResultPart part
= new SimpleResultPart();
20 part
.setStatus(SimpleResultPart
.PASSED
);
21 part
.setMessage("Sub task with path " + path
+ " executed");
23 TestResult result
= testRun
.getTestResult();
24 result
.addResultPart(part
);
27 public void notifyCurrentPath(StructureRegistry registry
, StructurePath path
) {
28 this.path
= (TreeSPath
) path
;
31 public String
getDescription() {
35 public void setDescription(String description
) {
36 this.description
= description
;