Package: TraceTestTreeNode

TraceTestTreeNode

nameinstructionbranchcomplexitylinemethod
TraceTestTreeNode(TraceTestResult)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
addChild(ITreeNode)
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getAdapter(Class)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getChildren()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getName()
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%
getNumber()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getParent()
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%
getStatus()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasChild(String)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasChildren()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasRunTimeError()
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%
setParent(ITreeNode)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setResult(TraceTestResult)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setRunTimeError()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setStatus(Verdict)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
toString()
M: 26 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * Combinatorial Testing
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.ide.plugins.combinatorialtesting.views.treeView;
23:
24: import java.util.List;
25:
26: import org.eclipse.core.runtime.IAdaptable;
27: import org.overture.ct.utils.TraceTestResult;
28: import org.overture.interpreter.traces.Verdict;
29:
30: public class TraceTestTreeNode implements IAdaptable, ITreeNode
31: {
32:         private TraceTestResult result;
33:         protected ITreeNode parent;
34:
35:         private boolean runTimeError = false;
36:
37:         public TraceTestTreeNode(TraceTestResult status)
38:         {
39:
40:                 this.result = status;
41:         }
42:
43:         public boolean hasRunTimeError()
44:         {
45:                 return runTimeError;
46:         }
47:
48:         public void setRunTimeError()
49:         {
50:                 this.runTimeError = true;
51:         }
52:
53:         public void setStatus(Verdict status)
54:         {
55:                 this.runTimeError = false;
56:                 this.result.setStatus(status);
57:         }
58:
59:         public void setResult(TraceTestResult result)
60:         {
61:
62:                 this.result = result;
63:         }
64:
65:         public Verdict getStatus()
66:         {
67:                 return this.result.getStatus();
68:         }
69:
70:         public ITreeNode getParent()
71:         {
72:                 return parent;
73:         }
74:
75:         public TraceTestResult getResult()
76:         {
77:                 return result;
78:         }
79:
80:         @Override
81:         public String toString()
82:         {
83:                 String tmp = result.getNumber().toString();
84:•                while (tmp.length() < 6)
85:                 {
86:                         tmp = "0" + tmp;
87:                 }
88:                 return "Test " + tmp;
89:         }
90:
91:         public String getName()
92:         {
93:                 return toString();
94:         }
95:
96:         public Integer getNumber()
97:         {
98:                 return result.getNumber();
99:         }
100:
101:         public void setParent(ITreeNode parent)
102:         {
103:                 this.parent = parent;
104:         }
105:
106:         public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
107:         {
108:                 return null;
109:         }
110:
111:         public void addChild(ITreeNode child)
112:         {
113:
114:         }
115:
116:         public List<ITreeNode> getChildren()
117:         {
118:                 return null;
119:         }
120:
121:         public boolean hasChild(String name)
122:         {
123:                 return false;
124:         }
125:
126:         public boolean hasChildren()
127:         {
128:                 return false;
129:         }
130:
131:
132: }