1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.se.visitor; |
17 |
|
|
18 |
|
import org.qedeq.base.test.QedeqTestCase; |
19 |
|
import org.qedeq.kernel.se.common.DefaultModuleAddress; |
20 |
|
import org.qedeq.kernel.se.common.ModuleContext; |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
@author |
26 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 4 |
Complexity Density: 0.33 |
|
27 |
|
public class InterruptExceptionTest extends QedeqTestCase { |
28 |
|
|
29 |
|
private InterruptException ex1; |
30 |
|
|
31 |
|
private InterruptException ex2; |
32 |
|
|
33 |
|
private InterruptException ex3; |
34 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
35 |
3
|
public void setUp() throws Exception {... |
36 |
3
|
super.setUp(); |
37 |
3
|
this.ex1 = new InterruptException(new ModuleContext( |
38 |
|
new DefaultModuleAddress())); |
39 |
3
|
this.ex2 = new InterruptException(new ModuleContext( |
40 |
|
new DefaultModuleAddress())); |
41 |
3
|
this.ex3 = new InterruptException(new ModuleContext( |
42 |
|
new DefaultModuleAddress(true, "another"))); |
43 |
|
} |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
1
PASS
|
|
48 |
1
|
public void testConstructor() throws Exception {... |
49 |
1
|
assertEquals(87001, ex1.getErrorCode()); |
50 |
1
|
assertEquals("Process execution was canceled", ex1.getMessage()); |
51 |
1
|
assertEquals(new ModuleContext(new DefaultModuleAddress()), ex1.getContext()); |
52 |
|
} |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1
PASS
|
|
57 |
1
|
public void testHashCode() throws Exception {... |
58 |
1
|
assertTrue(ex1.hashCode() == ex2.hashCode()); |
59 |
1
|
assertFalse(ex1.hashCode() == ex3.hashCode()); |
60 |
|
} |
61 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
1
PASS
|
|
62 |
1
|
public void testEqualsObject() throws Exception {... |
63 |
1
|
assertEquals(ex1, ex2); |
64 |
1
|
assertFalse(ex1.equals(ex3)); |
65 |
1
|
assertFalse(ex3.equals(ex2)); |
66 |
|
} |
67 |
|
|
68 |
|
} |