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.datamodel.SequenceI; |
24 |
|
import jalview.gui.JvOptionPane; |
25 |
|
|
26 |
|
import static org.testng.Assert.assertEquals; |
27 |
|
import static org.testng.Assert.assertNotNull; |
28 |
|
|
29 |
|
import java.io.File; |
30 |
|
import java.io.IOException; |
31 |
|
|
32 |
|
import org.testng.annotations.AfterClass; |
33 |
|
import org.testng.annotations.BeforeClass; |
34 |
|
import org.testng.annotations.Test; |
35 |
|
|
36 |
|
import fr.orsay.lri.varna.utils.RNAMLParser; |
37 |
|
import groovy.lang.Sequence; |
38 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 5 |
Complexity Density: 0.62 |
|
39 |
|
public class RNAMLfileTest |
40 |
|
{ |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
42 |
1 |
@BeforeClass(alwaysRun = true)... |
43 |
|
public void setUpJvOptionPane() |
44 |
|
{ |
45 |
1 |
JvOptionPane.setInteractiveMode(false); |
46 |
1 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
47 |
|
} |
48 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
49 |
1 |
@BeforeClass(alwaysRun = true)... |
50 |
|
public static void setUpBeforeClass() throws Exception |
51 |
|
{ |
52 |
|
} |
53 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
54 |
1 |
@AfterClass(alwaysRun = true)... |
55 |
|
public static void tearDownAfterClass() throws Exception |
56 |
|
{ |
57 |
|
} |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1PASS
|
|
59 |
1 |
@Test(groups = { "Functional" })... |
60 |
|
public void testRnamlToStockholmIO() |
61 |
|
{ |
62 |
1 |
StockholmFileTest.testFileIOwithFormat( |
63 |
|
new File("examples/testdata/rna-alignment.xml"), |
64 |
|
FileFormat.Stockholm, -1, -1, true, true, true); |
65 |
|
|
66 |
|
} |
67 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1PASS
|
|
68 |
1 |
@Test(groups = { "Functional" })... |
69 |
|
public void testRnamlSeqImport() throws IOException |
70 |
|
{ |
71 |
1 |
RnamlFile parser = new RnamlFile("examples/testdata/7WKP-rna1.xml", |
72 |
|
DataSourceType.FILE); |
73 |
1 |
SequenceI[] seqs = parser.getSeqsAsArray(); |
74 |
1 |
assertNotNull(seqs); |
75 |
1 |
assertEquals(seqs.length, 1); |
76 |
1 |
assertEquals(seqs[0].getEnd() - seqs[0].getStart() + 1, |
77 |
|
seqs[0].getSequence().length); |
78 |
|
} |
79 |
|
|
80 |
|
} |