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 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 5 |
Complexity Density: 0.62 |
|
39 |
|
public class RNAMLfileTest |
40 |
|
{ |
41 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
42 |
0 |
@BeforeClass(alwaysRun = true)... |
43 |
|
public void setUpJvOptionPane() |
44 |
|
{ |
45 |
0 |
JvOptionPane.setInteractiveMode(false); |
46 |
0 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
47 |
|
} |
48 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
49 |
0 |
@BeforeClass(alwaysRun = true)... |
50 |
|
public static void setUpBeforeClass() throws Exception |
51 |
|
{ |
52 |
|
} |
53 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
54 |
0 |
@AfterClass(alwaysRun = true)... |
55 |
|
public static void tearDownAfterClass() throws Exception |
56 |
|
{ |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
4-
|
|
59 |
0 |
@Test(groups = { "Functional" })... |
60 |
|
public void testRnamlToStockholmIO() |
61 |
|
{ |
62 |
0 |
StockholmFileTest.testFileIOwithFormat( |
63 |
|
new File("examples/testdata/rna-alignment.xml"), |
64 |
|
FileFormat.Stockholm, -1, -1, true, true, true); |
65 |
|
|
66 |
|
} |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
4-
|
|
68 |
0 |
@Test(groups = { "Functional" })... |
69 |
|
public void testRnamlSeqImport() throws IOException |
70 |
|
{ |
71 |
0 |
RnamlFile parser = new RnamlFile("examples/testdata/7WKP-rna1.xml", |
72 |
|
DataSourceType.FILE); |
73 |
0 |
SequenceI[] seqs = parser.getSeqsAsArray(); |
74 |
0 |
assertNotNull(seqs); |
75 |
0 |
assertEquals(seqs.length, 1); |
76 |
0 |
assertEquals(seqs[0].getEnd() - seqs[0].getStart() + 1, |
77 |
|
seqs[0].getSequence().length); |
78 |
|
} |
79 |
|
|
80 |
|
} |