]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunDescriptor.java
Adapt for agents
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / test / TestRunDescriptor.java
1 package org.argeo.slc.test;
2
3 import org.argeo.slc.deploy.DeployedSystem;
4 import org.argeo.slc.process.SlcExecutionRelated;
5
6 public class TestRunDescriptor {
7 private String testRunUuid;
8 private String slcExecutionUuid;
9 private String slcExecutionStepUuid;
10 private String testResultUuid;
11 private String deployedSytemId;
12
13 public TestRunDescriptor() {
14
15 }
16
17 public TestRunDescriptor(TestRun testRun) {
18 testRunUuid = testRun.getUuid();
19
20 if (testRun.getTestResult() != null)
21 testResultUuid = testRun.<TestResult> getTestResult().getUuid();
22
23 if (testRun.getDeployedSystem() != null)
24 deployedSytemId = testRun.<DeployedSystem> getDeployedSystem()
25 .getDeployedSystemId();
26
27 if (testRun instanceof SlcExecutionRelated) {
28 slcExecutionUuid = ((SlcExecutionRelated) testRun)
29 .getSlcExecutionUuid();
30 slcExecutionStepUuid = ((SlcExecutionRelated) testRun)
31 .getSlcExecutionStepUuid();
32 }
33 }
34
35 public String getTestRunUuid() {
36 return testRunUuid;
37 }
38
39 public void setTestRunUuid(String testRunUuid) {
40 this.testRunUuid = testRunUuid;
41 }
42
43 public String getSlcExecutionUuid() {
44 return slcExecutionUuid;
45 }
46
47 public void setSlcExecutionUuid(String slcExecutionUuid) {
48 this.slcExecutionUuid = slcExecutionUuid;
49 }
50
51 public String getSlcExecutionStepUuid() {
52 return slcExecutionStepUuid;
53 }
54
55 public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {
56 this.slcExecutionStepUuid = slcExecutionStepUuid;
57 }
58
59 public String getTestResultUuid() {
60 return testResultUuid;
61 }
62
63 public void setTestResultUuid(String testResultUuid) {
64 this.testResultUuid = testResultUuid;
65 }
66
67 public String getDeployedSytemId() {
68 return deployedSytemId;
69 }
70
71 public void setDeployedSytemId(String deploymentId) {
72 this.deployedSytemId = deploymentId;
73 }
74
75 @Override
76 public boolean equals(Object obj) {
77 if (obj instanceof TestRunDescriptor) {
78 return getTestRunUuid().equals(
79 ((TestRunDescriptor) obj).getTestRunUuid());
80 }
81 return false;
82 }
83 }