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