| 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 java.util.Date; |
| 24 |
|
|
| 25 |
|
import org.testng.annotations.AfterClass; |
| 26 |
|
import org.testng.annotations.BeforeClass; |
| 27 |
|
import org.testng.annotations.BeforeTest; |
| 28 |
|
|
| 29 |
|
import jalview.bin.Cache; |
| 30 |
|
import jalview.bin.Jalview; |
| 31 |
|
import jalview.datamodel.AlignmentAnnotation; |
| 32 |
|
import jalview.datamodel.SequenceI; |
| 33 |
|
import jalview.gui.Desktop; |
| 34 |
|
import jalview.gui.JvOptionPane; |
| 35 |
|
|
| |
|
| 73.3% |
Uncovered Elements: 8 (30) |
Complexity: 11 |
Complexity Density: 0.65 |
|
| 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 |
3 |
@BeforeClass(alwaysRun = true)... |
| 50 |
|
public static void setUpBeforeClass() throws Exception |
| 51 |
|
{ |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
3 |
Cache.loadProperties("test/jalview/io/testProps.jvprops"); |
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
3 |
Date oneHourFromNow = new Date( |
| 62 |
|
System.currentTimeMillis() + 3600 * 1000); |
| 63 |
3 |
Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED", oneHourFromNow); |
| 64 |
|
|
| 65 |
3 |
Jalview.main(new String[] {}); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
|
| 69 |
|
@throws |
| 70 |
|
|
| |
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 71 |
3 |
@AfterClass(alwaysRun = true)... |
| 72 |
|
public static void tearDownAfterClass() throws Exception |
| 73 |
|
{ |
| 74 |
3 |
if (Desktop.instance != null) |
| 75 |
3 |
Desktop.instance.closeAll_actionPerformed(null); |
| 76 |
|
} |
| 77 |
|
|
| |
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 4 |
Complexity Density: 2 |
|
| 78 |
4 |
@BeforeTest(alwaysRun = true)... |
| 79 |
|
public static void clearDesktop() |
| 80 |
|
{ |
| 81 |
4 |
if (Desktop.instance != null && Desktop.getFrames() != null |
| 82 |
|
&& Desktop.getFrames().length > 0) |
| 83 |
|
{ |
| 84 |
0 |
Desktop.instance.closeAll_actionPerformed(null); |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|
| |
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 88 |
2 |
public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)... |
| 89 |
|
{ |
| 90 |
2 |
int numdsann = 0; |
| 91 |
2 |
for (SequenceI sq : avp.getAlignment().getDataset().getSequences()) |
| 92 |
|
{ |
| 93 |
122 |
if (sq.getAnnotation() != null) |
| 94 |
|
{ |
| 95 |
122 |
for (AlignmentAnnotation dssa : sq.getAnnotation()) |
| 96 |
|
{ |
| 97 |
122 |
if (dssa.isValidStruc()) |
| 98 |
|
{ |
| 99 |
122 |
numdsann++; |
| 100 |
|
} |
| 101 |
|
} |
| 102 |
|
} |
| 103 |
|
} |
| 104 |
2 |
return numdsann; |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
} |