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