]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/test/tree/TreeTestResultTestUtils.java
First draft of DAO implementation for JCR.
[gpl/argeo-slc.git] / runtime / org.argeo.slc.unit / src / main / java / org / argeo / slc / unit / test / tree / TreeTestResultTestUtils.java
index cf4b0c1e4db848c081d6422199f6467540905bf2..284f0cc625ae05147828435ea8685afbf3bbc6d2 100644 (file)
@@ -2,7 +2,9 @@ package org.argeo.slc.unit.test.tree;
 \r
 import java.util.UUID;\r
 \r
+\r
 import org.argeo.slc.build.Distribution;\r
+import org.argeo.slc.core.attachment.SimpleAttachment;\r
 import org.argeo.slc.core.structure.SimpleSElement;\r
 import org.argeo.slc.core.structure.tree.TreeSPath;\r
 import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
@@ -41,11 +43,32 @@ public abstract class TreeTestResultTestUtils {
                return ttr;\r
        }\r
 \r
+       public static TreeTestResult createComplexeTreeTestResult() {\r
+               SlcExecution slcExecution = SlcExecutionTestUtils\r
+                               .createSimpleSlcExecution();\r
+               SlcExecutionStep step = new SlcExecutionStep("JUnit step");\r
+               slcExecution.getSteps().add(step);\r
+\r
+               TreeTestResult ttr = createMinimalConsistentTreeTestResult(slcExecution);\r
+\r
+               ttr.addResultPart(createSimpleResultPartPassed());\r
+               ttr.addResultPart(createSimpleResultPartFailed());\r
+               //ttr.addResultPart(createSimpleResultPartError());\r
+               \r
+               SimpleAttachment sa = new SimpleAttachment(UUID.randomUUID().toString(),"AnAttachment","UTF8");\r
+               SimpleAttachment sa2 = new SimpleAttachment(UUID.randomUUID().toString(),"AnOtherAttachment","UTF8");\r
+               ttr.addAttachment(sa);\r
+               ttr.addAttachment(sa2);\r
+               return ttr;\r
+       }\r
+\r
        public static TreeTestResult createMinimalConsistentTreeTestResult(\r
                        SlcExecution slcExecution) {\r
                SimpleTestRun testRun = new SimpleTestRun();\r
                testRun.setUuid(UUID.randomUUID().toString());\r
 \r
+               // Doesn't work in hibernate with such a path.\r
+               //String pathStr = "/fileDiff/testcases/issue";\r
                String pathStr = "/test";\r
                TreeSPath path = new TreeSPath(pathStr);\r
 \r