1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.bo.logic.wf; |
17 |
|
|
18 |
|
import java.util.List; |
19 |
|
|
20 |
|
import org.qedeq.kernel.bo.logic.common.FormulaChecker; |
21 |
|
import org.qedeq.kernel.bo.logic.common.LogicalCheckExceptionList; |
22 |
|
import org.qedeq.kernel.se.base.list.Atom; |
23 |
|
import org.qedeq.kernel.se.base.list.Element; |
24 |
|
import org.qedeq.kernel.se.base.list.ElementList; |
25 |
|
import org.qedeq.kernel.se.common.DefaultModuleAddress; |
26 |
|
import org.qedeq.kernel.se.common.ModuleContext; |
27 |
|
import org.qedeq.kernel.se.dto.list.DefaultAtom; |
28 |
|
import org.qedeq.kernel.se.dto.list.DefaultElementList; |
29 |
|
|
30 |
|
|
31 |
|
@link |
32 |
|
|
33 |
|
@author |
34 |
|
|
|
|
| 53.6% |
Uncovered Elements: 130 (280) |
Complexity: 122 |
Complexity Density: 0.77 |
|
35 |
|
public class FormulaCheckerGlobalTest extends AbstractFormulaChecker { |
36 |
|
|
37 |
|
|
38 |
|
private ModuleContext context; |
39 |
|
|
40 |
|
private FormulaChecker checker; |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
42 |
19
|
protected void setUp() throws Exception {... |
43 |
19
|
context = new ModuleContext(new DefaultModuleAddress("http://memory.org/sample.xml"), "getElement()"); |
44 |
19
|
checker = new FormulaCheckerImpl(); |
45 |
|
} |
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
19
|
protected void tearDown() throws Exception {... |
48 |
19
|
context = null; |
49 |
|
} |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@throws |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
58 |
1
|
public void testGlobalFormulaPositive() throws Exception {... |
59 |
1
|
final Element ele = new DefaultElementList("EQUI", new Element[] { |
60 |
|
new DefaultElementList("PREDCON", new Element[] { |
61 |
|
new DefaultAtom("equal"), |
62 |
|
new DefaultElementList("VAR", new Element[] { |
63 |
|
new DefaultAtom("y"), |
64 |
|
}), |
65 |
|
new DefaultElementList("CLASS", new Element[] { |
66 |
|
new DefaultElementList("VAR", new Element[] { |
67 |
|
new DefaultAtom("x"), |
68 |
|
}), |
69 |
|
new DefaultElementList("PREDVAR", new Element[] { |
70 |
|
new DefaultAtom("\\phi"), |
71 |
|
new DefaultElementList("VAR", new Element[] { |
72 |
|
new DefaultAtom("x"), |
73 |
|
}) |
74 |
|
}) |
75 |
|
}) |
76 |
|
}), |
77 |
|
new DefaultElementList("FORALL", new Element[] { |
78 |
|
new DefaultElementList("VAR", new Element[] { |
79 |
|
new DefaultAtom("z"), |
80 |
|
}), |
81 |
|
new DefaultElementList("EQUI", new Element[] { |
82 |
|
new DefaultElementList("PREDCON", new Element[] { |
83 |
|
new DefaultAtom("in"), |
84 |
|
new DefaultElementList("VAR", new Element[] { |
85 |
|
new DefaultAtom("z"), |
86 |
|
}), |
87 |
|
new DefaultElementList("VAR", new Element[] { |
88 |
|
new DefaultAtom("y"), |
89 |
|
}) |
90 |
|
}), |
91 |
|
new DefaultElementList("PREDCON", new Element[] { |
92 |
|
new DefaultAtom("in"), |
93 |
|
new DefaultElementList("VAR", new Element[] { |
94 |
|
new DefaultAtom("z"), |
95 |
|
}), |
96 |
|
new DefaultElementList("CLASS", new Element[] { |
97 |
|
new DefaultElementList("VAR", new Element[] { |
98 |
|
new DefaultAtom("x"), |
99 |
|
}), |
100 |
|
new DefaultElementList("PREDVAR", new Element[] { |
101 |
|
new DefaultAtom("\\phi"), |
102 |
|
new DefaultElementList("VAR", new Element[] { |
103 |
|
new DefaultAtom("x"), |
104 |
|
}) |
105 |
|
}) |
106 |
|
}) |
107 |
|
}) |
108 |
|
}) |
109 |
|
}) |
110 |
|
}); |
111 |
|
|
112 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
113 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
114 |
|
} |
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
@throws |
122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
123 |
1
|
public void testGlobalFormulaNegative01() throws Exception {... |
124 |
1
|
LogicalCheckExceptionList list = |
125 |
|
checker.checkFormula(null, context); |
126 |
1
|
assertEquals(1, list.size()); |
127 |
1
|
assertEquals(30400, list.get(0).getErrorCode()); |
128 |
|
} |
129 |
|
|
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
@throws |
136 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
137 |
1
|
public void testGlobalTermNegative01() throws Exception {... |
138 |
1
|
LogicalCheckExceptionList list = |
139 |
|
checker.checkFormula(null, context); |
140 |
1
|
assertEquals(1, list.size()); |
141 |
1
|
assertEquals(30400, list.get(0).getErrorCode()); |
142 |
|
} |
143 |
|
|
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
|
148 |
|
|
149 |
|
@throws |
150 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
151 |
1
|
public void testGlobalFormulaNegative03() throws Exception {... |
152 |
1
|
LogicalCheckExceptionList list = |
153 |
|
checker.checkFormula(new DefaultElementList("PREDVAR", new Element[]{new Atom() { |
154 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
155 |
0
|
public String getString() {... |
156 |
0
|
return null; |
157 |
|
} |
158 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
159 |
1
|
public boolean isAtom() {... |
160 |
1
|
return true; |
161 |
|
} |
162 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
163 |
1
|
public Atom getAtom() {... |
164 |
1
|
return null; |
165 |
|
} |
166 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
167 |
0
|
public boolean isList() {... |
168 |
0
|
return false; |
169 |
|
} |
170 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
171 |
0
|
public ElementList getList() {... |
172 |
0
|
return null; |
173 |
|
} |
174 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
175 |
0
|
public Element copy() {... |
176 |
0
|
return null; |
177 |
|
} |
178 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
179 |
0
|
public Element replace(final Element search, final Element replacement) {... |
180 |
0
|
return null; |
181 |
|
} |
182 |
|
} |
183 |
|
}), context); |
184 |
1
|
assertEquals(1, list.size()); |
185 |
1
|
assertEquals(30410, list.get(0).getErrorCode()); |
186 |
|
} |
187 |
|
|
188 |
|
|
189 |
|
|
190 |
|
|
191 |
|
|
192 |
|
|
193 |
|
@throws |
194 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
195 |
1
|
public void testGlobalFormulaNegative04() throws Exception {... |
196 |
1
|
LogicalCheckExceptionList list = |
197 |
|
checker.checkTerm(new DefaultElementList("FUNCON", new Element[] {new Atom() { |
198 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
199 |
0
|
public String getString() {... |
200 |
0
|
return null; |
201 |
|
} |
202 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
203 |
1
|
public boolean isAtom() {... |
204 |
1
|
return true; |
205 |
|
} |
206 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
207 |
1
|
public Atom getAtom() {... |
208 |
1
|
return null; |
209 |
|
} |
210 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
211 |
0
|
public boolean isList() {... |
212 |
0
|
return false; |
213 |
|
} |
214 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
215 |
0
|
public ElementList getList() {... |
216 |
0
|
return null; |
217 |
|
} |
218 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
219 |
0
|
public Element copy() {... |
220 |
0
|
return null; |
221 |
|
} |
222 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
223 |
0
|
public Element replace(final Element search, final Element replacement) {... |
224 |
0
|
return null; |
225 |
|
} |
226 |
|
} |
227 |
|
}), context); |
228 |
1
|
assertEquals(1, list.size()); |
229 |
1
|
assertEquals(30410, list.get(0).getErrorCode()); |
230 |
|
} |
231 |
|
|
232 |
|
|
233 |
|
|
234 |
|
|
235 |
|
|
236 |
|
|
237 |
|
@throws |
238 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
239 |
1
|
public void testGlobalFormulaNegative05() throws Exception {... |
240 |
1
|
LogicalCheckExceptionList list = |
241 |
|
checker.checkFormula(new Element() { |
242 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
243 |
0
|
public boolean isAtom() {... |
244 |
0
|
return false; |
245 |
|
} |
246 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
247 |
0
|
public Atom getAtom() {... |
248 |
0
|
return null; |
249 |
|
} |
250 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
251 |
1
|
public boolean isList() {... |
252 |
1
|
return true; |
253 |
|
} |
254 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
255 |
1
|
public ElementList getList() {... |
256 |
1
|
return null; |
257 |
|
} |
258 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
259 |
0
|
public Element copy() {... |
260 |
0
|
return null; |
261 |
|
} |
262 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
263 |
0
|
public Element replace(final Element search, final Element replacement) {... |
264 |
0
|
return null; |
265 |
|
} |
266 |
|
}, context); |
267 |
1
|
assertEquals(1, list.size()); |
268 |
1
|
assertEquals(30420, list.get(0).getErrorCode()); |
269 |
|
} |
270 |
|
|
271 |
|
|
272 |
|
|
273 |
|
|
274 |
|
|
275 |
|
|
276 |
|
@throws |
277 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
278 |
1
|
public void testGlobalFormulaNegative06() throws Exception {... |
279 |
1
|
LogicalCheckExceptionList list = |
280 |
|
checker.checkTerm(new Element() { |
281 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
282 |
0
|
public boolean isAtom() {... |
283 |
0
|
return false; |
284 |
|
} |
285 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
286 |
0
|
public Atom getAtom() {... |
287 |
0
|
return null; |
288 |
|
} |
289 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
290 |
1
|
public boolean isList() {... |
291 |
1
|
return true; |
292 |
|
} |
293 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
294 |
1
|
public ElementList getList() {... |
295 |
1
|
return null; |
296 |
|
} |
297 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
298 |
0
|
public Element copy() {... |
299 |
0
|
return null; |
300 |
|
} |
301 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
302 |
0
|
public Element replace(final Element search, final Element replacement) {... |
303 |
0
|
return null; |
304 |
|
} |
305 |
|
}, context); |
306 |
1
|
assertEquals(1, list.size()); |
307 |
1
|
assertEquals(30420, list.get(0).getErrorCode()); |
308 |
|
} |
309 |
|
|
310 |
|
|
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
@throws |
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
317 |
1
|
public void testGlobalFormulaNegative07() throws Exception {... |
318 |
1
|
LogicalCheckExceptionList list = |
319 |
|
checker.checkFormula(new DefaultElementList("PREDVAR", new Element[]{new Atom() { |
320 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
321 |
1
|
public String getString() {... |
322 |
1
|
return null; |
323 |
|
} |
324 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
325 |
1
|
public boolean isAtom() {... |
326 |
1
|
return true; |
327 |
|
} |
328 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
329 |
1
|
public Atom getAtom() {... |
330 |
1
|
return this; |
331 |
|
} |
332 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
333 |
0
|
public boolean isList() {... |
334 |
0
|
return false; |
335 |
|
} |
336 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
337 |
0
|
public ElementList getList() {... |
338 |
0
|
return null; |
339 |
|
} |
340 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
341 |
0
|
public Element copy() {... |
342 |
0
|
return null; |
343 |
|
} |
344 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
345 |
0
|
public Element replace(final Element search, final Element replacement) {... |
346 |
0
|
return null; |
347 |
|
} |
348 |
|
} |
349 |
|
}), context); |
350 |
1
|
assertEquals(1, list.size()); |
351 |
1
|
assertEquals(30430, list.get(0).getErrorCode()); |
352 |
|
} |
353 |
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
@throws |
360 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
361 |
1
|
public void testGlobalFormulaNegative08() throws Exception {... |
362 |
1
|
LogicalCheckExceptionList list = |
363 |
|
checker.checkTerm(new DefaultElementList("FUNCON", new Element[]{new Atom() { |
364 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
365 |
1
|
public String getString() {... |
366 |
1
|
return null; |
367 |
|
} |
368 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
369 |
1
|
public boolean isAtom() {... |
370 |
1
|
return true; |
371 |
|
} |
372 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
373 |
1
|
public Atom getAtom() {... |
374 |
1
|
return this; |
375 |
|
} |
376 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
377 |
0
|
public boolean isList() {... |
378 |
0
|
return false; |
379 |
|
} |
380 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
381 |
0
|
public ElementList getList() {... |
382 |
0
|
return null; |
383 |
|
} |
384 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
385 |
0
|
public Element copy() {... |
386 |
0
|
return null; |
387 |
|
} |
388 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
389 |
0
|
public Element replace(final Element search, final Element replacement) {... |
390 |
0
|
return null; |
391 |
|
} |
392 |
|
} |
393 |
|
}), context); |
394 |
1
|
assertEquals(1, list.size()); |
395 |
1
|
assertEquals(30430, list.get(0).getErrorCode()); |
396 |
|
} |
397 |
|
|
398 |
|
|
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
|
403 |
|
@throws |
404 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
405 |
1
|
public void testGlobalFormulaNegative09() throws Exception {... |
406 |
1
|
LogicalCheckExceptionList list = |
407 |
|
checker.checkFormula(new DefaultElementList("PREDVAR", new Element[]{new Atom() { |
408 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
409 |
2
|
public String getString() {... |
410 |
2
|
return ""; |
411 |
|
} |
412 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
413 |
1
|
public boolean isAtom() {... |
414 |
1
|
return true; |
415 |
|
} |
416 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
417 |
1
|
public Atom getAtom() {... |
418 |
1
|
return this; |
419 |
|
} |
420 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
421 |
0
|
public boolean isList() {... |
422 |
0
|
return false; |
423 |
|
} |
424 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
425 |
0
|
public ElementList getList() {... |
426 |
0
|
return null; |
427 |
|
} |
428 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
429 |
0
|
public Element copy() {... |
430 |
0
|
return null; |
431 |
|
} |
432 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
433 |
0
|
public Element replace(final Element search, final Element replacement) {... |
434 |
0
|
return null; |
435 |
|
} |
436 |
|
} |
437 |
|
}), context); |
438 |
1
|
assertEquals(1, list.size()); |
439 |
1
|
assertEquals(30440, list.get(0).getErrorCode()); |
440 |
|
} |
441 |
|
|
442 |
|
|
443 |
|
|
444 |
|
|
445 |
|
|
446 |
|
|
447 |
|
@throws |
448 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
449 |
1
|
public void testGlobalFormulaNegative11() throws Exception {... |
450 |
1
|
final Element ele = new DefaultElementList("PREDCON", new Element[] { |
451 |
|
new DefaultAtom("")}); |
452 |
|
|
453 |
1
|
LogicalCheckExceptionList list = |
454 |
|
checker.checkFormula(ele, context); |
455 |
1
|
assertEquals(1, list.size()); |
456 |
1
|
assertEquals(30440, list.get(0).getErrorCode()); |
457 |
|
} |
458 |
|
|
459 |
|
|
460 |
|
|
461 |
|
|
462 |
|
|
463 |
|
|
464 |
|
@throws |
465 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
466 |
1
|
public void testGlobalFormulaNegative12() throws Exception {... |
467 |
1
|
final Element ele = new DefaultElementList("FUNCON", new Element[] { |
468 |
|
new DefaultAtom("")}); |
469 |
|
|
470 |
1
|
LogicalCheckExceptionList list = |
471 |
|
checker.checkTerm(ele, context); |
472 |
1
|
assertEquals(1, list.size()); |
473 |
1
|
assertEquals(30440, list.get(0).getErrorCode()); |
474 |
|
} |
475 |
|
|
476 |
|
|
477 |
|
|
478 |
|
|
479 |
|
|
480 |
|
|
481 |
|
@throws |
482 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
483 |
1
|
public void testGlobalFormulaNegative13() throws Exception {... |
484 |
1
|
final Element ele = new ElementList() { |
485 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
486 |
0
|
public int size() {... |
487 |
0
|
return 0; |
488 |
|
} |
489 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
490 |
1
|
public String getOperator() {... |
491 |
1
|
return null; |
492 |
|
} |
493 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
494 |
0
|
public Element getElement(final int i) {... |
495 |
0
|
return null; |
496 |
|
} |
497 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
498 |
0
|
public List getElements() {... |
499 |
0
|
return null; |
500 |
|
} |
501 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
502 |
0
|
public void add(final Element element) {... |
503 |
|
|
504 |
|
} |
505 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
506 |
0
|
public void insert(final int position, final Element element) {... |
507 |
|
} |
508 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
509 |
0
|
public void replace(final int position, final Element element) {... |
510 |
|
} |
511 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
512 |
0
|
public void remove(final int i) {... |
513 |
|
} |
514 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
515 |
0
|
public boolean isAtom() {... |
516 |
0
|
return false; |
517 |
|
} |
518 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
519 |
0
|
public Atom getAtom() {... |
520 |
0
|
return null; |
521 |
|
} |
522 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
523 |
1
|
public boolean isList() {... |
524 |
1
|
return true; |
525 |
|
} |
526 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
527 |
1
|
public ElementList getList() {... |
528 |
1
|
return this; |
529 |
|
} |
530 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
531 |
0
|
public Element copy() {... |
532 |
0
|
return null; |
533 |
|
} |
534 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
535 |
0
|
public Element replace(final Element search, final Element replacement) {... |
536 |
0
|
return null; |
537 |
|
} |
538 |
|
|
539 |
|
}; |
540 |
|
|
541 |
1
|
LogicalCheckExceptionList list = |
542 |
|
checker.checkFormula(ele, context); |
543 |
1
|
assertEquals(1, list.size()); |
544 |
1
|
assertEquals(30450, list.get(0).getErrorCode()); |
545 |
|
} |
546 |
|
|
547 |
|
|
548 |
|
|
549 |
|
|
550 |
|
|
551 |
|
|
552 |
|
@throws |
553 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
554 |
1
|
public void testGlobalFormulaNegative14() throws Exception {... |
555 |
1
|
final Element ele = new ElementList() { |
556 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
557 |
0
|
public int size() {... |
558 |
0
|
return 0; |
559 |
|
} |
560 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
561 |
1
|
public String getOperator() {... |
562 |
1
|
return null; |
563 |
|
} |
564 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
565 |
0
|
public Element getElement(final int i) {... |
566 |
0
|
return null; |
567 |
|
} |
568 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
569 |
0
|
public List getElements() {... |
570 |
0
|
return null; |
571 |
|
} |
572 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
573 |
0
|
public void add(final Element element) {... |
574 |
|
|
575 |
|
} |
576 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
577 |
0
|
public void insert(final int position, final Element element) {... |
578 |
|
} |
579 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
580 |
0
|
public void replace(final int position, final Element element) {... |
581 |
|
} |
582 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
583 |
0
|
public void remove(final int i) {... |
584 |
|
} |
585 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
586 |
0
|
public boolean isAtom() {... |
587 |
0
|
return false; |
588 |
|
} |
589 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
590 |
0
|
public Atom getAtom() {... |
591 |
0
|
return null; |
592 |
|
} |
593 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
594 |
1
|
public boolean isList() {... |
595 |
1
|
return true; |
596 |
|
} |
597 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
598 |
1
|
public ElementList getList() {... |
599 |
1
|
return this; |
600 |
|
} |
601 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
602 |
0
|
public Element copy() {... |
603 |
0
|
return null; |
604 |
|
} |
605 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
606 |
0
|
public Element replace(final Element search, final Element replacement) {... |
607 |
0
|
return null; |
608 |
|
} |
609 |
|
}; |
610 |
|
|
611 |
1
|
LogicalCheckExceptionList list = |
612 |
|
checker.checkTerm(ele, context); |
613 |
1
|
assertEquals(1, list.size()); |
614 |
1
|
assertEquals(30450, list.get(0).getErrorCode()); |
615 |
|
} |
616 |
|
|
617 |
|
|
618 |
|
|
619 |
|
|
620 |
|
|
621 |
|
|
622 |
|
@throws |
623 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
624 |
1
|
public void testGlobalFormulaNegative15() throws Exception {... |
625 |
1
|
final Element ele = new Element() { |
626 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
627 |
0
|
public boolean isAtom() {... |
628 |
0
|
return false; |
629 |
|
} |
630 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
631 |
0
|
public Atom getAtom() {... |
632 |
0
|
return null; |
633 |
|
} |
634 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
635 |
1
|
public boolean isList() {... |
636 |
1
|
return true; |
637 |
|
} |
638 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
639 |
1
|
public ElementList getList() {... |
640 |
1
|
return new DefaultElementList("", new Element[] {}); |
641 |
|
} |
642 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
643 |
0
|
public Element copy() {... |
644 |
0
|
return null; |
645 |
|
} |
646 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
647 |
0
|
public Element replace(final Element search, final Element replacement) {... |
648 |
0
|
return null; |
649 |
|
} |
650 |
|
}; |
651 |
1
|
LogicalCheckExceptionList list = |
652 |
|
checker.checkFormula(ele, context); |
653 |
1
|
assertEquals(1, list.size()); |
654 |
1
|
assertEquals(30460, list.get(0).getErrorCode()); |
655 |
|
} |
656 |
|
|
657 |
|
|
658 |
|
|
659 |
|
|
660 |
|
|
661 |
|
|
662 |
|
@throws |
663 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
664 |
1
|
public void testGlobalFormulaNegative16() throws Exception {... |
665 |
1
|
final Element ele = new Element() { |
666 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
667 |
0
|
public boolean isAtom() {... |
668 |
0
|
return false; |
669 |
|
} |
670 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
671 |
0
|
public Atom getAtom() {... |
672 |
0
|
return null; |
673 |
|
} |
674 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
675 |
1
|
public boolean isList() {... |
676 |
1
|
return true; |
677 |
|
} |
678 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
679 |
1
|
public ElementList getList() {... |
680 |
1
|
return new DefaultElementList("", new Element[] {}); |
681 |
|
} |
682 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
683 |
0
|
public Element copy() {... |
684 |
0
|
return null; |
685 |
|
} |
686 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
687 |
0
|
public Element replace(final Element search, final Element replacement) {... |
688 |
0
|
return null; |
689 |
|
} |
690 |
|
}; |
691 |
1
|
LogicalCheckExceptionList list = |
692 |
|
checker.checkTerm(ele, context); |
693 |
1
|
assertEquals(1, list.size()); |
694 |
1
|
assertEquals(30460, list.get(0).getErrorCode()); |
695 |
|
} |
696 |
|
|
697 |
|
|
698 |
|
|
699 |
|
|
700 |
|
|
701 |
|
|
702 |
|
@throws |
703 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
704 |
1
|
public void testGlobalFormulaNegative21() throws Exception {... |
705 |
1
|
final Element ele = new ElementList() { |
706 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
707 |
0
|
public int size() {... |
708 |
0
|
return 0; |
709 |
|
} |
710 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
711 |
1
|
public String getOperator() {... |
712 |
1
|
return ""; |
713 |
|
} |
714 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
715 |
0
|
public Element getElement(final int i) {... |
716 |
0
|
return null; |
717 |
|
} |
718 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
719 |
0
|
public List getElements() {... |
720 |
0
|
return null; |
721 |
|
} |
722 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
723 |
0
|
public void add(final Element element) {... |
724 |
|
|
725 |
|
} |
726 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
727 |
0
|
public void insert(final int position, final Element element) {... |
728 |
|
} |
729 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
730 |
0
|
public void replace(final int position, final Element element) {... |
731 |
|
} |
732 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
733 |
0
|
public void remove(final int i) {... |
734 |
|
} |
735 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
736 |
0
|
public boolean isAtom() {... |
737 |
0
|
return false; |
738 |
|
} |
739 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
740 |
0
|
public Atom getAtom() {... |
741 |
0
|
return null; |
742 |
|
} |
743 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
744 |
1
|
public boolean isList() {... |
745 |
1
|
return true; |
746 |
|
} |
747 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
748 |
1
|
public ElementList getList() {... |
749 |
1
|
return this; |
750 |
|
} |
751 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
752 |
0
|
public Element copy() {... |
753 |
0
|
return null; |
754 |
|
} |
755 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
756 |
0
|
public Element replace(final Element search, final Element replacement) {... |
757 |
0
|
return null; |
758 |
|
} |
759 |
|
}; |
760 |
|
|
761 |
1
|
LogicalCheckExceptionList list = |
762 |
|
checker.checkFormula(ele, context); |
763 |
1
|
assertEquals(1, list.size()); |
764 |
1
|
assertEquals(30460, list.get(0).getErrorCode()); |
765 |
|
} |
766 |
|
|
767 |
|
|
768 |
|
|
769 |
|
|
770 |
|
|
771 |
|
|
772 |
|
@throws |
773 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
774 |
1
|
public void testGlobalFormulaNegative23() throws Exception {... |
775 |
1
|
final Element ele = new DefaultAtom("Atom"); |
776 |
|
|
777 |
1
|
LogicalCheckExceptionList list = |
778 |
|
checker.checkFormula(ele, context); |
779 |
1
|
assertEquals(1, list.size()); |
780 |
1
|
assertEquals(30470, list.get(0).getErrorCode()); |
781 |
|
} |
782 |
|
|
783 |
|
|
784 |
|
|
785 |
|
|
786 |
|
|
787 |
|
|
788 |
|
@throws |
789 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
790 |
1
|
public void testGlobalFormulaNegative24() throws Exception {... |
791 |
1
|
final Element ele = new DefaultAtom("Atom"); |
792 |
|
|
793 |
1
|
LogicalCheckExceptionList list = |
794 |
|
checker.checkTerm(ele, context); |
795 |
1
|
assertEquals(1, list.size()); |
796 |
1
|
assertEquals(30470, list.get(0).getErrorCode()); |
797 |
|
} |
798 |
|
|
799 |
|
} |