1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.bo.test; |
17 |
|
|
18 |
|
import java.lang.reflect.InvocationTargetException; |
19 |
|
|
20 |
|
import org.qedeq.base.io.Version; |
21 |
|
import org.qedeq.base.test.DynamicGetter; |
22 |
|
import org.qedeq.kernel.bo.KernelContext; |
23 |
|
import org.qedeq.kernel.bo.common.QedeqBo; |
24 |
|
import org.qedeq.kernel.bo.logic.ProofCheckerFactoryImpl; |
25 |
|
import org.qedeq.kernel.bo.logic.proof.checker.ProofChecker0Impl; |
26 |
|
import org.qedeq.kernel.bo.logic.proof.checker.ProofChecker1Impl; |
27 |
|
import org.qedeq.kernel.bo.logic.proof.checker.ProofChecker2Impl; |
28 |
|
import org.qedeq.kernel.bo.logic.proof.common.ProofChecker; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
@link |
34 |
|
|
35 |
|
@author |
36 |
|
|
|
|
| 64.7% |
Uncovered Elements: 12 (34) |
Complexity: 12 |
Complexity Density: 0.48 |
|
37 |
|
public class TestingProofCheckerFactoryImpl extends ProofCheckerFactoryImpl { |
38 |
|
|
|
|
| 69.2% |
Uncovered Elements: 4 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
39 |
72
|
public ProofChecker createProofChecker(final Version ruleVersion) {... |
40 |
72
|
if (ruleVersion.equals("0.00.00")) { |
41 |
0
|
return new ProofChecker0Impl() { |
42 |
|
|
43 |
|
}; |
44 |
72
|
} else if (ruleVersion.equals("0.01.00")) { |
45 |
39
|
return new ProofChecker1Impl() { |
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 4 |
Complexity Density: 0.44 |
|
46 |
1121
|
protected void setLocationWithinModule(final String locationWithinModule) {... |
47 |
1121
|
getCurrentContext().setLocationWithinModule(locationWithinModule); |
48 |
1121
|
try { |
49 |
1121
|
System.out.println("testing context " + locationWithinModule); |
50 |
1121
|
QedeqBo qedeq = KernelContext.getInstance().getQedeqBo(getCurrentContext().getModuleLocation()); |
51 |
1121
|
DynamicGetter.get(qedeq.getQedeq(), getCurrentContext().getLocationWithinModule()); |
52 |
|
} catch (RuntimeException e) { |
53 |
0
|
System.out.println(getCurrentContext().getLocationWithinModule()); |
54 |
0
|
throw e; |
55 |
|
} catch (IllegalAccessException e) { |
56 |
0
|
throw new RuntimeException(e); |
57 |
|
} catch (InvocationTargetException e) { |
58 |
0
|
throw new RuntimeException(e); |
59 |
|
} |
60 |
|
} |
61 |
|
|
62 |
|
}; |
63 |
33
|
} else if (ruleVersion.equals("0.02.00")) { |
64 |
33
|
return new ProofChecker2Impl() { |
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 4 |
Complexity Density: 0.44 |
|
65 |
1229
|
protected void setLocationWithinModule(final String locationWithinModule) {... |
66 |
1229
|
getCurrentContext().setLocationWithinModule(locationWithinModule); |
67 |
1229
|
try { |
68 |
1229
|
System.out.println("testing context " + locationWithinModule); |
69 |
1229
|
QedeqBo qedeq = KernelContext.getInstance().getQedeqBo(getCurrentContext().getModuleLocation()); |
70 |
1229
|
DynamicGetter.get(qedeq.getQedeq(), getCurrentContext().getLocationWithinModule()); |
71 |
|
} catch (RuntimeException e) { |
72 |
0
|
System.out.println(getCurrentContext().getLocationWithinModule()); |
73 |
0
|
throw e; |
74 |
|
} catch (IllegalAccessException e) { |
75 |
0
|
throw new RuntimeException(e); |
76 |
|
} catch (InvocationTargetException e) { |
77 |
0
|
throw new RuntimeException(e); |
78 |
|
} |
79 |
|
} |
80 |
|
|
81 |
|
}; |
82 |
|
} |
83 |
|
|
84 |
0
|
return new ProofChecker2Impl(); |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
} |