+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
package org.argeo.slc.unit.test.tree;\r
\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
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