1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.io; |
22 |
|
|
23 |
|
import jalview.bin.Cache; |
24 |
|
import jalview.bin.Jalview; |
25 |
|
import jalview.datamodel.AlignmentAnnotation; |
26 |
|
import jalview.datamodel.SequenceI; |
27 |
|
import jalview.gui.Desktop; |
28 |
|
import jalview.gui.JvOptionPane; |
29 |
|
|
30 |
|
import java.util.Date; |
31 |
|
|
32 |
|
import org.testng.annotations.AfterClass; |
33 |
|
import org.testng.annotations.BeforeClass; |
34 |
|
import org.testng.annotations.BeforeTest; |
35 |
|
|
|
|
| 74.1% |
Uncovered Elements: 7 (27) |
Complexity: 10 |
Complexity Density: 0.62 |
|
36 |
|
public class Jalview2xmlBase |
37 |
|
{ |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
39 |
0 |
@BeforeClass(alwaysRun = true)... |
40 |
|
public void setUpJvOptionPane() |
41 |
|
{ |
42 |
0 |
JvOptionPane.setInteractiveMode(false); |
43 |
0 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
44 |
|
} |
45 |
|
|
46 |
|
|
47 |
|
@throws |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
49 |
2 |
@BeforeClass(alwaysRun = true)... |
50 |
|
public static void setUpBeforeClass() throws Exception |
51 |
|
{ |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
2 |
Cache.loadProperties("test/jalview/io/testProps.jvprops"); |
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
2 |
Date oneHourFromNow = new Date(System.currentTimeMillis() + 3600 * 1000); |
62 |
2 |
Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED", oneHourFromNow); |
63 |
|
|
64 |
2 |
Jalview.main(new String[] {}); |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
@throws |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
2 |
@AfterClass(alwaysRun = true)... |
71 |
|
public static void tearDownAfterClass() throws Exception |
72 |
|
{ |
73 |
2 |
jalview.gui.Desktop.instance.closeAll_actionPerformed(null); |
74 |
|
} |
75 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 4 |
Complexity Density: 2 |
|
76 |
1 |
@BeforeTest(alwaysRun = true)... |
77 |
|
public static void clearDesktop() |
78 |
|
{ |
79 |
1 |
if (Desktop.instance != null && Desktop.getFrames() != null |
80 |
|
&& Desktop.getFrames().length > 0) |
81 |
|
{ |
82 |
0 |
Desktop.instance.closeAll_actionPerformed(null); |
83 |
|
} |
84 |
|
} |
85 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
86 |
2 |
public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)... |
87 |
|
{ |
88 |
2 |
int numdsann = 0; |
89 |
2 |
for (SequenceI sq : avp.getAlignment().getDataset().getSequences()) |
90 |
|
{ |
91 |
122 |
if (sq.getAnnotation() != null) |
92 |
|
{ |
93 |
122 |
for (AlignmentAnnotation dssa : sq.getAnnotation()) |
94 |
|
{ |
95 |
122 |
if (dssa.isValidStruc()) |
96 |
|
{ |
97 |
122 |
numdsann++; |
98 |
|
} |
99 |
|
} |
100 |
|
} |
101 |
|
} |
102 |
2 |
return numdsann; |
103 |
|
} |
104 |
|
|
105 |
|
} |