]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleTask.java
1 package org
.argeo
.slc
.example
;
3 import org
.argeo
.slc
.core
.structure
.SimpleSElement
;
4 import org
.argeo
.slc
.core
.structure
.StructureAware
;
5 import org
.argeo
.slc
.core
.structure
.StructureElement
;
6 import org
.argeo
.slc
.core
.structure
.StructureElementProvider
;
7 import org
.argeo
.slc
.core
.structure
.StructurePath
;
8 import org
.argeo
.slc
.core
.structure
.StructureRegistry
;
9 import org
.argeo
.slc
.core
.structure
.tree
.TreeSPath
;
10 import org
.argeo
.slc
.core
.test
.SimpleResultPart
;
11 import org
.argeo
.slc
.core
.test
.TestDefinition
;
12 import org
.argeo
.slc
.core
.test
.TestResult
;
13 import org
.argeo
.slc
.core
.test
.TestRun
;
16 public class ExampleTask
implements StructureAware
<TreeSPath
>, TestDefinition
,
17 StructureElementProvider
{
18 private TreeSPath path
;
19 private String description
;
21 public void execute(TestRun testRun
) {
22 SimpleResultPart part
= new SimpleResultPart(PASSED
,
23 "Sub task with path " + path
+ " executed", null);
25 TestResult result
= testRun
.getTestResult();
26 result
.addResultPart(part
);
29 public void notifyCurrentPath(StructureRegistry
<TreeSPath
> registry
,
34 public StructureElement
createStructureElement() {
35 return new SimpleSElement(description
);
38 /** Sets the description. */
39 public void setDescription(String description
) {
40 this.description
= description
;