2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org
.argeo
.slc
.test
;
19 import org
.argeo
.slc
.deploy
.DeployedSystem
;
20 import org
.argeo
.slc
.process
.SlcExecutionRelated
;
22 public class TestRunDescriptor
{
23 private String testRunUuid
;
24 private String slcExecutionUuid
;
25 private String slcExecutionStepUuid
;
26 private String testResultUuid
;
27 private String deployedSytemId
;
29 public TestRunDescriptor() {
33 public TestRunDescriptor(TestRun testRun
) {
34 testRunUuid
= testRun
.getUuid();
36 if (testRun
.getTestResult() != null)
37 testResultUuid
= testRun
.<TestResult
> getTestResult().getUuid();
39 if (testRun
.getDeployedSystem() != null)
40 deployedSytemId
= testRun
.<DeployedSystem
> getDeployedSystem()
41 .getDeployedSystemId();
43 if (testRun
instanceof SlcExecutionRelated
) {
44 slcExecutionUuid
= ((SlcExecutionRelated
) testRun
)
45 .getSlcExecutionUuid();
46 slcExecutionStepUuid
= ((SlcExecutionRelated
) testRun
)
47 .getSlcExecutionStepUuid();
51 public String
getTestRunUuid() {
55 public void setTestRunUuid(String testRunUuid
) {
56 this.testRunUuid
= testRunUuid
;
59 public String
getSlcExecutionUuid() {
60 return slcExecutionUuid
;
63 public void setSlcExecutionUuid(String slcExecutionUuid
) {
64 this.slcExecutionUuid
= slcExecutionUuid
;
67 public String
getSlcExecutionStepUuid() {
68 return slcExecutionStepUuid
;
71 public void setSlcExecutionStepUuid(String slcExecutionStepUuid
) {
72 this.slcExecutionStepUuid
= slcExecutionStepUuid
;
75 public String
getTestResultUuid() {
76 return testResultUuid
;
79 public void setTestResultUuid(String testResultUuid
) {
80 this.testResultUuid
= testResultUuid
;
83 public String
getDeployedSytemId() {
84 return deployedSytemId
;
87 public void setDeployedSytemId(String deploymentId
) {
88 this.deployedSytemId
= deploymentId
;
92 public boolean equals(Object obj
) {
93 if (obj
instanceof TestRunDescriptor
) {
94 return getTestRunUuid().equals(
95 ((TestRunDescriptor
) obj
).getTestRunUuid());