| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.fest.swing.core; |
| 17 |
|
|
| 18 |
|
import static org.fest.swing.util.AWTExceptionHandlerInstaller.installAWTExceptionHandler; |
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
@author |
| 24 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 25 |
|
class TestTerminator { |
| 26 |
|
|
| 27 |
|
private final ThreadsSource threadsSource; |
| 28 |
|
private final FrameDisposer frameDisposer; |
| 29 |
|
private final MainThreadIdentifier mainThreadIdentifier; |
| 30 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 31 |
5
|
TestTerminator() {... |
| 32 |
5
|
this(new ThreadsSource(), new FrameDisposer(), new MainThreadIdentifier()); |
| 33 |
|
} |
| 34 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 35 |
7
|
TestTerminator(ThreadsSource threadsSource, FrameDisposer frameDisposer, MainThreadIdentifier mainThreadIdentifier) {... |
| 36 |
7
|
this.threadsSource = threadsSource; |
| 37 |
7
|
this.frameDisposer = frameDisposer; |
| 38 |
7
|
this.mainThreadIdentifier = mainThreadIdentifier; |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 47 |
2
|
void terminateTests() {... |
| 48 |
2
|
pokeMainThread(); |
| 49 |
2
|
frameDisposer.disposeFrames(); |
| 50 |
2
|
throw new RuntimeException("User aborted FEST-Swing tests"); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
@link |
| 55 |
|
@link@link |
| 56 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 57 |
2
|
private void pokeMainThread() {... |
| 58 |
2
|
Thread mainThread = mainThreadIdentifier.mainThreadIn(threadsSource.allThreads()); |
| 59 |
1
|
if (mainThread != null) mainThread.interrupt(); |
| 60 |
|
} |
| 61 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 62 |
6
|
static {... |
| 63 |
|
|
| 64 |
6
|
installAWTExceptionHandler(SimpleFallbackExceptionHandler.class); |
| 65 |
|
} |
| 66 |
|
} |