1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.schemes; |
22 |
|
|
23 |
|
import static org.testng.AssertJUnit.assertTrue; |
24 |
|
|
25 |
|
import jalview.gui.JvOptionPane; |
26 |
|
|
27 |
|
import java.util.Map; |
28 |
|
|
29 |
|
import org.testng.annotations.BeforeClass; |
30 |
|
import org.testng.annotations.Test; |
31 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 4 |
Complexity Density: 0.57 |
|
32 |
|
public class DnaCodonTests |
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 (1) |
Complexity: 1 |
Complexity Density: 1 |
1PASS
|
|
42 |
1 |
@Test(groups = { "Functional" })... |
43 |
|
public void testAmbiguityCodeGeneration() |
44 |
|
{ |
45 |
1 |
assertTrue(ResidueProperties.ambiguityCodes.size() > 0); |
46 |
|
} |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
48 |
1 |
@Test(groups = { "Functional" })... |
49 |
|
public void testAmbiguityCodon() |
50 |
|
{ |
51 |
1 |
for (String ac : ResidueProperties.ambiguityCodes.keySet()) |
52 |
|
{ |
53 |
11 |
assertTrue("Couldn't resolve GGN as glycine codon", |
54 |
|
ResidueProperties.codonHash2.get("GG" + ac).equals("G")); |
55 |
|
} |
56 |
|
} |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
58 |
1 |
@Test(groups = { "Functional" })... |
59 |
|
public void regenerateCodonTable() |
60 |
|
{ |
61 |
1 |
for (Map.Entry<String, String> codon : ResidueProperties.codonHash2 |
62 |
|
.entrySet()) |
63 |
|
{ |
64 |
176 |
System.out.println("ResidueProperties.codonHash2.set(\"" |
65 |
|
+ codon.getKey() + "\", \"" + codon.getValue() + "\");"); |
66 |
|
} |
67 |
|
} |
68 |
|
} |