]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleTestRun.java
refactor and clean of the distribution view model.
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / SimpleTestRun.java
index e9b83995b9e926c5ec62c41f388e937fe4689b06..4f6a12f819f1ef5cead2beb384e81c5ef5fbb9f8 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
+ * Copyright (C) 2007-2012 Argeo GmbH\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
@@ -17,13 +17,7 @@ package org.argeo.slc.core.test;
 \r
 import java.util.UUID;\r
 \r
-import org.argeo.slc.core.structure.tree.TreeSPath;\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.StructureRegistry;\r
 import org.argeo.slc.test.ExecutableTestRun;\r
 import org.argeo.slc.test.TestData;\r
 import org.argeo.slc.test.TestDefinition;\r
@@ -34,16 +28,11 @@ 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
+public class SimpleTestRun implements WritableTestRun, ExecutableTestRun {\r
        private String uuid;\r
 \r
-       private String slcExecutionUuid;\r
-       private String slcExecutionStepUuid;\r
-\r
-       private TreeSPath path;\r
-       private StructureRegistry<TreeSPath> registry;\r
+       // private String slcExecutionUuid;\r
+       // private String slcExecutionStepUuid;\r
 \r
        private DeployedSystem deployedSystem;\r
        private TestData testData;\r
@@ -51,22 +40,11 @@ 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
                        testResult.notifyTestRun(this);\r
 \r
-               // Structure\r
-               if (testResult != null && path != null\r
-                               && testResult instanceof StructureAware)\r
-                       ((StructureAware<TreeSPath>) testResult).notifyCurrentPath(\r
-                                       registry, path);\r
-\r
-               if (path != null && testDefinition instanceof StructureAware)\r
-                       ((StructureAware<TreeSPath>) testDefinition).notifyCurrentPath(\r
-                                       registry, path);\r
-\r
                testDefinition.execute(this);\r
        }\r
 \r
@@ -114,37 +92,19 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun,
                this.uuid = uuid;\r
        }\r
 \r
-       public String getSlcExecutionUuid() {\r
-               return slcExecutionUuid;\r
-       }\r
-\r
-       public void setSlcExecutionUuid(String slcExecutionUuid) {\r
-               this.slcExecutionUuid = slcExecutionUuid;\r
-       }\r
-\r
-       public String getSlcExecutionStepUuid() {\r
-               return slcExecutionStepUuid;\r
-       }\r
-\r
-       public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {\r
-               this.slcExecutionStepUuid = slcExecutionStepUuid;\r
-       }\r
-\r
-       @Deprecated\r
-       public void notifySlcExecution(SlcExecution slcExecution) {\r
-               if (slcExecution != null) {\r
-                       slcExecutionUuid = slcExecution.getUuid();\r
-                       SlcExecutionStep step = slcExecution.currentStep();\r
-                       if (step != null) {\r
-                               slcExecutionStepUuid = step.getUuid();\r
-                       }\r
-               }\r
-       }\r
-\r
-       public void notifyCurrentPath(StructureRegistry<TreeSPath> registry,\r
-                       TreeSPath path) {\r
-               this.registry = registry;\r
-               this.path = path;\r
-       }\r
-\r
+       // public String getSlcExecutionUuid() {\r
+       // return slcExecutionUuid;\r
+       // }\r
+       //\r
+       // public void setSlcExecutionUuid(String slcExecutionUuid) {\r
+       // this.slcExecutionUuid = slcExecutionUuid;\r
+       // }\r
+       //\r
+       // public String getSlcExecutionStepUuid() {\r
+       // return slcExecutionStepUuid;\r
+       // }\r
+       //\r
+       // public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {\r
+       // this.slcExecutionStepUuid = slcExecutionStepUuid;\r
+       // }\r
 }\r