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 org.qedeq.kernel.bo.logic.common.FormulaChecker; |
19 |
|
import org.qedeq.kernel.bo.logic.common.LogicalCheckExceptionList; |
20 |
|
import org.qedeq.kernel.se.base.list.Element; |
21 |
|
import org.qedeq.kernel.se.common.DefaultModuleAddress; |
22 |
|
import org.qedeq.kernel.se.common.ModuleContext; |
23 |
|
import org.qedeq.kernel.xml.parser.BasicParser; |
24 |
|
|
25 |
|
|
26 |
|
@link |
27 |
|
|
28 |
|
|
29 |
|
@author |
30 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (125) |
Complexity: 26 |
Complexity Density: 0.26 |
|
31 |
|
public class FormulaCheckerLogicalConnectivesTest extends AbstractFormulaChecker { |
32 |
|
|
33 |
|
private ModuleContext context; |
34 |
|
|
35 |
|
private FormulaChecker checker; |
36 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
37 |
24
|
protected void setUp() throws Exception {... |
38 |
24
|
context = new ModuleContext(new DefaultModuleAddress("http://memory.org/sample.xml"), "getElement()"); |
39 |
24
|
checker = new FormulaCheckerImpl(); |
40 |
|
} |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
24
|
protected void tearDown() throws Exception {... |
43 |
24
|
context = null; |
44 |
|
} |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
@throws |
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
53 |
1
|
public void testLogicalConnectivePositive01() throws Exception {... |
54 |
1
|
final Element ele = BasicParser.createElement( |
55 |
|
"<AND><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></AND>"); |
56 |
|
|
57 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
58 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
59 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
60 |
|
.hasErrors()); |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
@throws |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
70 |
1
|
public void testLogicalConnectivePositive02() throws Exception {... |
71 |
1
|
final Element ele = BasicParser.createElement( |
72 |
|
"<OR><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></OR>"); |
73 |
|
|
74 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
75 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
76 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
77 |
|
.hasErrors()); |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
@throws |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
87 |
1
|
public void testLogicalConnectivePositive03() throws Exception {... |
88 |
1
|
final Element ele = BasicParser.createElement( |
89 |
|
"<IMPL><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></IMPL>"); |
90 |
|
|
91 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
92 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
93 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
94 |
|
.hasErrors()); |
95 |
|
} |
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
@throws |
103 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
104 |
1
|
public void testLogicalConnectivePositive04() throws Exception {... |
105 |
1
|
final Element ele = BasicParser.createElement( |
106 |
|
"<EQUI><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></EQUI>"); |
107 |
|
|
108 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
109 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
110 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
111 |
|
.hasErrors()); |
112 |
|
} |
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
@throws |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
121 |
1
|
public void testLogicalConnectivePositive05() throws Exception {... |
122 |
1
|
final Element ele = BasicParser.createElement( |
123 |
|
"<AND><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></AND>"); |
124 |
|
|
125 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
126 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
127 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
128 |
|
.hasErrors()); |
129 |
|
} |
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
@throws |
137 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
138 |
1
|
public void testLogicalConnectivePositive06() throws Exception {... |
139 |
1
|
final Element ele = BasicParser.createElement( |
140 |
|
"<OR><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></OR>"); |
141 |
|
|
142 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
143 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
144 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
145 |
|
.hasErrors()); |
146 |
|
} |
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
|
@throws |
154 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
155 |
1
|
public void testLogicalConnectivePositive07() throws Exception {... |
156 |
1
|
final Element ele = BasicParser.createElement( |
157 |
|
"<EQUI><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></EQUI>"); |
158 |
|
|
159 |
1
|
assertFalse(checker.checkFormula(ele, context).hasErrors()); |
160 |
1
|
assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); |
161 |
1
|
assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) |
162 |
|
.hasErrors()); |
163 |
|
} |
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
|
169 |
|
|
170 |
|
@throws |
171 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
172 |
1
|
public void testLogicalConnectiveNegative01() throws Exception {... |
173 |
1
|
final Element ele = BasicParser.createElement("<AND />"); |
174 |
|
|
175 |
1
|
LogicalCheckExceptionList list = |
176 |
|
checker.checkFormula(ele, context, getChecker()); |
177 |
1
|
assertEquals(1, list.size()); |
178 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
179 |
|
} |
180 |
|
|
181 |
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
@throws |
187 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
188 |
1
|
public void testLogicalConnectiveNegative02() throws Exception {... |
189 |
1
|
final Element ele = BasicParser.createElement("<OR />"); |
190 |
|
|
191 |
1
|
LogicalCheckExceptionList list = |
192 |
|
checker.checkFormula(ele, context, getChecker()); |
193 |
1
|
assertEquals(1, list.size()); |
194 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
195 |
|
} |
196 |
|
|
197 |
|
|
198 |
|
|
199 |
|
|
200 |
|
|
201 |
|
|
202 |
|
@throws |
203 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
204 |
1
|
public void testLogicalConnectiveNegative03() throws Exception {... |
205 |
1
|
final Element ele = BasicParser.createElement("<IMPL />"); |
206 |
|
|
207 |
1
|
LogicalCheckExceptionList list = |
208 |
|
checker.checkFormula(ele, context, getChecker()); |
209 |
1
|
assertEquals(1, list.size()); |
210 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
211 |
|
} |
212 |
|
|
213 |
|
|
214 |
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
@throws |
219 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
220 |
1
|
public void testLogicalConnectiveNegative04() throws Exception {... |
221 |
1
|
final Element ele = BasicParser.createElement("<EQUI />"); |
222 |
|
|
223 |
1
|
LogicalCheckExceptionList list = |
224 |
|
checker.checkFormula(ele, context, getChecker()); |
225 |
1
|
assertEquals(1, list.size()); |
226 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
227 |
|
} |
228 |
|
|
229 |
|
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
|
234 |
|
@throws |
235 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
236 |
1
|
public void testLogicalConnectiveNegative05() throws Exception {... |
237 |
1
|
final Element ele = BasicParser.createElement("<AND><PREDVAR id=\"A\"/></AND>"); |
238 |
|
|
239 |
1
|
LogicalCheckExceptionList list = |
240 |
|
checker.checkFormula(ele, context, getChecker()); |
241 |
1
|
assertEquals(1, list.size()); |
242 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
243 |
|
} |
244 |
|
|
245 |
|
|
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
|
@throws |
251 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
252 |
1
|
public void testLogicalConnectiveNegative06() throws Exception {... |
253 |
1
|
final Element ele = BasicParser.createElement("<OR><PREDVAR id=\"A\"/></OR>"); |
254 |
|
|
255 |
1
|
LogicalCheckExceptionList list = |
256 |
|
checker.checkFormula(ele, context, getChecker()); |
257 |
1
|
assertEquals(1, list.size()); |
258 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
259 |
|
} |
260 |
|
|
261 |
|
|
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
|
@throws |
267 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
268 |
1
|
public void testLogicalConnectiveNegative07() throws Exception {... |
269 |
1
|
final Element ele = BasicParser.createElement("<IMPL><PREDVAR id=\"A\"/></IMPL>"); |
270 |
|
|
271 |
1
|
LogicalCheckExceptionList list = |
272 |
|
checker.checkFormula(ele, context, getChecker()); |
273 |
1
|
assertEquals(1, list.size()); |
274 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
|
281 |
|
|
282 |
|
@throws |
283 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
284 |
1
|
public void testLogicalConnectiveNegative08() throws Exception {... |
285 |
1
|
final Element ele = BasicParser.createElement("<EQUI><PREDVAR id=\"A\"/></EQUI>"); |
286 |
|
|
287 |
1
|
LogicalCheckExceptionList list = |
288 |
|
checker.checkFormula(ele, context, getChecker()); |
289 |
1
|
assertEquals(1, list.size()); |
290 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
291 |
|
} |
292 |
|
|
293 |
|
|
294 |
|
|
295 |
|
|
296 |
|
|
297 |
|
|
298 |
|
@throws |
299 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
300 |
1
|
public void testLogicalConnectiveNegative09() throws Exception {... |
301 |
1
|
final Element ele = BasicParser.createElement( |
302 |
|
"<IMPL><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></IMPL>"); |
303 |
|
|
304 |
1
|
LogicalCheckExceptionList list = |
305 |
|
checker.checkFormula(ele, context, getChecker()); |
306 |
1
|
assertEquals(1, list.size()); |
307 |
1
|
assertEquals(30760, list.get(0).getErrorCode()); |
308 |
|
} |
309 |
|
|
310 |
|
|
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
@throws |
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
317 |
1
|
public void testLogicalConnectiveNegative10() throws Exception {... |
318 |
1
|
final Element ele = BasicParser.createElement( |
319 |
|
"<AND>" + |
320 |
|
"<PREDVAR id=\"equal\">" + |
321 |
|
"<VAR id=\"x\" />" + |
322 |
|
"<VAR id=\"x\" />" + |
323 |
|
"</PREDVAR>" + |
324 |
|
"<PREDVAR id=\"equal\">" + |
325 |
|
"<VAR id=\"y\" />" + |
326 |
|
"<CLASS>" + |
327 |
|
"<VAR id=\"x\" />" + |
328 |
|
"<PREDVAR id=\"phi\" />" + |
329 |
|
"</CLASS>" + |
330 |
|
"</PREDVAR>" + |
331 |
|
"</AND>"); |
332 |
|
|
333 |
1
|
LogicalCheckExceptionList list = |
334 |
|
checker.checkFormula(ele, context, getChecker()); |
335 |
1
|
assertEquals(1, list.size()); |
336 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
337 |
|
} |
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
|
|
343 |
|
|
344 |
|
@throws |
345 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
346 |
1
|
public void testLogicalConnectiveNegative11() throws Exception {... |
347 |
1
|
final Element ele = BasicParser.createElement( |
348 |
|
"<AND>" + |
349 |
|
"<PREDVAR id=\"equal\">" + |
350 |
|
"<VAR id=\"y\" />" + |
351 |
|
"<CLASS>" + |
352 |
|
"<VAR id=\"x\" />" + |
353 |
|
"<PREDVAR id=\"phi\" />" + |
354 |
|
"</CLASS>" + |
355 |
|
"</PREDVAR>" + |
356 |
|
"<PREDVAR id=\"equal\">" + |
357 |
|
"<VAR id=\"x\" />" + |
358 |
|
"<VAR id=\"x\" />" + |
359 |
|
"</PREDVAR>" + |
360 |
|
"</AND>"); |
361 |
|
|
362 |
1
|
LogicalCheckExceptionList list = |
363 |
|
checker.checkFormula(ele, context, getChecker()); |
364 |
1
|
assertEquals(1, list.size()); |
365 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
366 |
|
} |
367 |
|
|
368 |
|
|
369 |
|
|
370 |
|
|
371 |
|
|
372 |
|
|
373 |
|
@throws |
374 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
375 |
1
|
public void testLogicalConnectiveNegative12() throws Exception {... |
376 |
1
|
final Element ele = BasicParser.createElement( |
377 |
|
"<OR>" + |
378 |
|
"<PREDVAR id=\"equal\">" + |
379 |
|
"<VAR id=\"x\" />" + |
380 |
|
"<VAR id=\"x\" />" + |
381 |
|
"</PREDVAR>" + |
382 |
|
"<PREDVAR id=\"equal\">" + |
383 |
|
"<VAR id=\"y\" />" + |
384 |
|
"<CLASS>" + |
385 |
|
"<VAR id=\"x\" />" + |
386 |
|
"<PREDVAR id=\"phi\" />" + |
387 |
|
"</CLASS>" + |
388 |
|
"</PREDVAR>" + |
389 |
|
"</OR>"); |
390 |
|
|
391 |
1
|
LogicalCheckExceptionList list = |
392 |
|
checker.checkFormula(ele, context, getChecker()); |
393 |
1
|
assertEquals(1, list.size()); |
394 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
395 |
|
} |
396 |
|
|
397 |
|
|
398 |
|
|
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
@throws |
403 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
404 |
1
|
public void testLogicalConnectiveNegative13() throws Exception {... |
405 |
1
|
final Element ele = BasicParser.createElement( |
406 |
|
"<OR>" + |
407 |
|
"<PREDVAR id=\"equal\">" + |
408 |
|
"<VAR id=\"y\" />" + |
409 |
|
"<CLASS>" + |
410 |
|
"<VAR id=\"x\" />" + |
411 |
|
"<PREDVAR id=\"phi\" />" + |
412 |
|
"</CLASS>" + |
413 |
|
"</PREDVAR>" + |
414 |
|
"<PREDVAR id=\"equal\">" + |
415 |
|
"<VAR id=\"x\" />" + |
416 |
|
"<VAR id=\"x\" />" + |
417 |
|
"</PREDVAR>" + |
418 |
|
"</OR>"); |
419 |
|
|
420 |
1
|
LogicalCheckExceptionList list = |
421 |
|
checker.checkFormula(ele, context, getChecker()); |
422 |
1
|
assertEquals(1, list.size()); |
423 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
424 |
|
} |
425 |
|
|
426 |
|
|
427 |
|
|
428 |
|
|
429 |
|
|
430 |
|
|
431 |
|
@throws |
432 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
433 |
1
|
public void testLogicalConnectiveNegative14() throws Exception {... |
434 |
1
|
final Element ele = BasicParser.createElement( |
435 |
|
"<IMPL>" + |
436 |
|
"<PREDVAR id=\"equal\">" + |
437 |
|
"<VAR id=\"x\" />" + |
438 |
|
"<VAR id=\"x\" />" + |
439 |
|
"</PREDVAR>" + |
440 |
|
"<PREDVAR id=\"equal\">" + |
441 |
|
"<VAR id=\"y\" />" + |
442 |
|
"<CLASS>" + |
443 |
|
"<VAR id=\"x\" />" + |
444 |
|
"<PREDVAR id=\"phi\" />" + |
445 |
|
"</CLASS>" + |
446 |
|
"</PREDVAR>" + |
447 |
|
"</IMPL>"); |
448 |
|
|
449 |
1
|
LogicalCheckExceptionList list = |
450 |
|
checker.checkFormula(ele, context, getChecker()); |
451 |
1
|
assertEquals(1, list.size()); |
452 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
453 |
|
} |
454 |
|
|
455 |
|
|
456 |
|
|
457 |
|
|
458 |
|
|
459 |
|
|
460 |
|
@throws |
461 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
462 |
1
|
public void testLogicalConnectiveNegative15() throws Exception {... |
463 |
1
|
final Element ele = BasicParser.createElement( |
464 |
|
"<IMPL>" + |
465 |
|
"<PREDVAR id=\"equal\">" + |
466 |
|
"<VAR id=\"y\" />" + |
467 |
|
"<CLASS>" + |
468 |
|
"<VAR id=\"x\" />" + |
469 |
|
"<PREDVAR id=\"phi\" />" + |
470 |
|
"</CLASS>" + |
471 |
|
"</PREDVAR>" + |
472 |
|
"<PREDVAR id=\"equal\">" + |
473 |
|
"<VAR id=\"x\" />" + |
474 |
|
"<VAR id=\"x\" />" + |
475 |
|
"</PREDVAR>" + |
476 |
|
"</IMPL>"); |
477 |
|
|
478 |
1
|
LogicalCheckExceptionList list = |
479 |
|
checker.checkFormula(ele, context, getChecker()); |
480 |
1
|
assertEquals(1, list.size()); |
481 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
482 |
|
} |
483 |
|
|
484 |
|
|
485 |
|
|
486 |
|
|
487 |
|
|
488 |
|
|
489 |
|
@throws |
490 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
491 |
1
|
public void testLogicalConnectiveNegative16() throws Exception {... |
492 |
1
|
final Element ele = BasicParser.createElement( |
493 |
|
"<EQUI>" + |
494 |
|
"<PREDVAR id=\"equal\">" + |
495 |
|
"<VAR id=\"x\" />" + |
496 |
|
"<VAR id=\"x\" />" + |
497 |
|
"</PREDVAR>" + |
498 |
|
"<PREDVAR id=\"equal\">" + |
499 |
|
"<VAR id=\"y\" />" + |
500 |
|
"<CLASS>" + |
501 |
|
"<VAR id=\"x\" />" + |
502 |
|
"<PREDVAR id=\"phi\" />" + |
503 |
|
"</CLASS>" + |
504 |
|
"</PREDVAR>" + |
505 |
|
"</EQUI>"); |
506 |
|
|
507 |
1
|
LogicalCheckExceptionList list = |
508 |
|
checker.checkFormula(ele, context, getChecker()); |
509 |
1
|
assertEquals(1, list.size()); |
510 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
511 |
|
} |
512 |
|
|
513 |
|
|
514 |
|
|
515 |
|
|
516 |
|
|
517 |
|
|
518 |
|
@throws |
519 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
520 |
1
|
public void testLogicalConnectiveNegative17() throws Exception {... |
521 |
1
|
final Element ele = BasicParser.createElement( |
522 |
|
"<EQUI>" + |
523 |
|
"<PREDVAR id=\"equal\">" + |
524 |
|
"<VAR id=\"y\" />" + |
525 |
|
"<CLASS>" + |
526 |
|
"<VAR id=\"x\" />" + |
527 |
|
"<PREDVAR id=\"phi\" />" + |
528 |
|
"</CLASS>" + |
529 |
|
"</PREDVAR>" + |
530 |
|
"<PREDVAR id=\"equal\">" + |
531 |
|
"<VAR id=\"x\" />" + |
532 |
|
"<VAR id=\"x\" />" + |
533 |
|
"</PREDVAR>" + |
534 |
|
"</EQUI>"); |
535 |
|
|
536 |
1
|
LogicalCheckExceptionList list = |
537 |
|
checker.checkFormula(ele, context, getChecker()); |
538 |
1
|
assertEquals(1, list.size()); |
539 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
540 |
|
} |
541 |
|
|
542 |
|
} |