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.AlignmentI; |
24 |
|
import jalview.gui.JvOptionPane; |
25 |
|
|
26 |
|
import java.io.IOException; |
27 |
|
|
28 |
|
import org.testng.Assert; |
29 |
|
import org.testng.annotations.BeforeClass; |
30 |
|
import org.testng.annotations.Test; |
31 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.38 |
|
32 |
|
public class PfamFormatInputTest |
33 |
|
{ |
34 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
35 |
0 |
@BeforeClass(alwaysRun = true)... |
36 |
|
public void setUpJvOptionPane() |
37 |
|
{ |
38 |
0 |
JvOptionPane.setInteractiveMode(false); |
39 |
0 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
40 |
|
} |
41 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
4-
|
|
42 |
0 |
@Test(groups = "Functional")... |
43 |
|
public void testPfamFormatNoLimits() throws IOException |
44 |
|
{ |
45 |
0 |
AlignmentI al = new AppletFormatAdapter().readFile( |
46 |
|
"ASEQ" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE, |
47 |
|
FileFormat.Pfam); |
48 |
0 |
Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); |
49 |
0 |
Assert.assertTrue(al.hasValidSequence(), |
50 |
|
"Didn't extract limits from PFAM ID"); |
51 |
|
} |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
4-
|
|
53 |
0 |
@Test(groups = "Functional")... |
54 |
|
public void testPfamFormatValidLimits() throws IOException |
55 |
|
{ |
56 |
0 |
AlignmentI al = new AppletFormatAdapter().readFile( |
57 |
|
"ASEQ/15-25" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE, |
58 |
|
FileFormat.Pfam); |
59 |
0 |
Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); |
60 |
0 |
Assert.assertTrue(al.hasValidSequence(), |
61 |
|
"Didn't extract limits from PFAM ID"); |
62 |
|
} |
63 |
|
} |