]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunDescriptor.java
2fb8b6376572d0bd430d49898379ba3a94c8be4c
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / test / TestRunDescriptor.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.slc.test;
18
19 import org.argeo.slc.deploy.DeployedSystem;
20 import org.argeo.slc.process.SlcExecutionRelated;
21
22 public class TestRunDescriptor {
23 private String testRunUuid;
24 private String slcExecutionUuid;
25 private String slcExecutionStepUuid;
26 private String testResultUuid;
27 private String deployedSytemId;
28
29 public TestRunDescriptor() {
30
31 }
32
33 public TestRunDescriptor(TestRun testRun) {
34 testRunUuid = testRun.getUuid();
35
36 if (testRun.getTestResult() != null)
37 testResultUuid = testRun.<TestResult> getTestResult().getUuid();
38
39 if (testRun.getDeployedSystem() != null)
40 deployedSytemId = testRun.<DeployedSystem> getDeployedSystem()
41 .getDeployedSystemId();
42
43 if (testRun instanceof SlcExecutionRelated) {
44 slcExecutionUuid = ((SlcExecutionRelated) testRun)
45 .getSlcExecutionUuid();
46 slcExecutionStepUuid = ((SlcExecutionRelated) testRun)
47 .getSlcExecutionStepUuid();
48 }
49 }
50
51 public String getTestRunUuid() {
52 return testRunUuid;
53 }
54
55 public void setTestRunUuid(String testRunUuid) {
56 this.testRunUuid = testRunUuid;
57 }
58
59 public String getSlcExecutionUuid() {
60 return slcExecutionUuid;
61 }
62
63 public void setSlcExecutionUuid(String slcExecutionUuid) {
64 this.slcExecutionUuid = slcExecutionUuid;
65 }
66
67 public String getSlcExecutionStepUuid() {
68 return slcExecutionStepUuid;
69 }
70
71 public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {
72 this.slcExecutionStepUuid = slcExecutionStepUuid;
73 }
74
75 public String getTestResultUuid() {
76 return testResultUuid;
77 }
78
79 public void setTestResultUuid(String testResultUuid) {
80 this.testResultUuid = testResultUuid;
81 }
82
83 public String getDeployedSytemId() {
84 return deployedSytemId;
85 }
86
87 public void setDeployedSytemId(String deploymentId) {
88 this.deployedSytemId = deploymentId;
89 }
90
91 @Override
92 public boolean equals(Object obj) {
93 if (obj instanceof TestRunDescriptor) {
94 return getTestRunUuid().equals(
95 ((TestRunDescriptor) obj).getTestRunUuid());
96 }
97 return false;
98 }
99 }