Package: TraceTest

TraceTest

nameinstructionbranchcomplexitylinemethod
TraceTest(Integer, String, String, Verdict)
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
equals(Object)
M: 76 C: 0
0%
M: 28 C: 0
0%
M: 15 C: 0
0%
M: 17 C: 0
0%
M: 1 C: 0
0%
getNo()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getResult()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getTest()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getVerdict()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hashCode()
M: 48 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
toString()
M: 25 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * The Java Code Generator Runtime
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.codegen.runtime.traces;
23:
24: import java.io.Serializable;
25:
26: public class TraceTest implements Serializable
27: {
28:         private static final long serialVersionUID = 1089982782591444372L;
29:
30:         private Integer no;
31:         private String test;
32:         private String result;
33:         private Verdict verdict;
34:
35:         public TraceTest(Integer no, String test, String result, Verdict verdict)
36:         {
37:                 super();
38:                 this.no = no;
39:                 this.test = test;
40:                 this.result = result;
41:                 this.verdict = verdict;
42:         }
43:
44:         public Integer getNo()
45:         {
46:                 return no;
47:         }
48:
49:         public String getTest()
50:         {
51:                 return test;
52:         }
53:
54:         public String getResult()
55:         {
56:                 return result;
57:         }
58:
59:         public Verdict getVerdict()
60:         {
61:                 return verdict;
62:         }
63:
64:         @Override
65:         public String toString()
66:         {
67:                 return String.format("TraceTest: Number: %s Test: %s Result: %s Verdict: %s", no, test, result, verdict);
68:         }
69:
70:         @Override
71:         public int hashCode()
72:         {
73:                 int hashCode = 0;
74:
75:•                hashCode += no != null ? no.hashCode() : 0;
76:•                hashCode += test != null ? test.hashCode() : 0;
77:•                hashCode += result != null ? result.hashCode() : 0;
78:•                hashCode += verdict != null ? verdict.hashCode() : 0;
79:
80:                 return hashCode;
81:         }
82:
83:         @Override
84:         public boolean equals(Object obj)
85:         {
86:•                if (obj == null)
87:                 {
88:                         return false;
89:                 }
90:
91:•                if (getClass() != obj.getClass())
92:                 {
93:                         return false;
94:                 }
95:
96:                 final TraceTest other = (TraceTest) obj;
97:
98:•                if (this.no == null ? other.no != null : !this.no.equals(other.no))
99:                 {
100:                         return false;
101:                 }
102:
103:•                if (this.test == null ? other.test != null
104:•                                : !this.test.equals(other.test))
105:                 {
106:                         return false;
107:                 }
108:
109:•                if (this.result == null ? other.result != null
110:•                                : !this.result.equals(other.result))
111:                 {
112:                         return false;
113:                 }
114:
115:•                if (this.verdict == null ? other.verdict != null
116:•                                : !this.verdict.equals(other.verdict))
117:                 {
118:                         return false;
119:                 }
120:
121:                 return true;
122:         }
123: }