]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleTestRun.java
Make default execution ressources temp dir dependent of the JVM OS user, in order...
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / SimpleTestRun.java
index 86b35323b2353e55572fec4469ec27fbc99ff2d2..e9b83995b9e926c5ec62c41f388e937fe4689b06 100644 (file)
@@ -1,15 +1,28 @@
+/*\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.core.test;\r
 \r
 import java.util.UUID;\r
 \r
 import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
 import org.argeo.slc.deploy.DeployedSystem;\r
 import org.argeo.slc.process.SlcExecution;\r
 import org.argeo.slc.process.SlcExecutionRelated;\r
 import org.argeo.slc.process.SlcExecutionStep;\r
 import org.argeo.slc.structure.StructureAware;\r
-import org.argeo.slc.structure.StructureElement;\r
 import org.argeo.slc.structure.StructureRegistry;\r
 import org.argeo.slc.test.ExecutableTestRun;\r
 import org.argeo.slc.test.TestData;\r
@@ -21,6 +34,7 @@ import org.argeo.slc.test.WritableTestRun;
  * A basic bean implementation of a <code>WritableTestRun</code>, holding\r
  * references to the various parts of a test run.\r
  */\r
+@SuppressWarnings("deprecation")\r
 public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,\r
                SlcExecutionRelated, StructureAware<TreeSPath> {\r
        private String uuid;\r
@@ -37,6 +51,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
        private TestResult testResult;\r
 \r
        /** Executes the underlying test definition. */\r
+       @SuppressWarnings("unchecked")\r
        public void run() {\r
                uuid = UUID.randomUUID().toString();\r
                if (testResult != null)\r
@@ -55,6 +70,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                testDefinition.execute(this);\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public <T extends DeployedSystem> T getDeployedSystem() {\r
                return (T) deployedSystem;\r
        }\r
@@ -63,6 +79,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                this.deployedSystem = deployedSystem;\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public <T extends TestData> T getTestData() {\r
                return (T) testData;\r
        }\r
@@ -71,6 +88,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                this.testData = testData;\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public <T extends TestDefinition> T getTestDefinition() {\r
                return (T) testDefinition;\r
        }\r
@@ -79,6 +97,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                this.testDefinition = testDefinition;\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public <T extends TestResult> T getTestResult() {\r
                return (T) testResult;\r
        }\r
@@ -111,6 +130,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                this.slcExecutionStepUuid = slcExecutionStepUuid;\r
        }\r
 \r
+       @Deprecated\r
        public void notifySlcExecution(SlcExecution slcExecution) {\r
                if (slcExecution != null) {\r
                        slcExecutionUuid = slcExecution.getUuid();\r