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