1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.gui; |
22 |
|
|
23 |
|
import static org.testng.AssertJUnit.assertEquals; |
24 |
|
import static org.testng.AssertJUnit.assertNull; |
25 |
|
import static org.testng.AssertJUnit.assertSame; |
26 |
|
|
27 |
|
import org.testng.annotations.BeforeClass; |
28 |
|
import org.testng.annotations.Test; |
29 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
|
30 |
|
public class AppVarnaTest |
31 |
|
{ |
32 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
33 |
1 |
@BeforeClass(alwaysRun = true)... |
34 |
|
public void setUpJvOptionPane() |
35 |
|
{ |
36 |
1 |
JvOptionPane.setInteractiveMode(false); |
37 |
1 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
38 |
|
} |
39 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1PASS
|
|
40 |
1 |
@Test(groups = "Functional")... |
41 |
|
public void testReplaceOddGaps() |
42 |
|
{ |
43 |
1 |
String struct = "{(<]}>)"; |
44 |
1 |
String replaced = AppVarna.replaceOddGaps(struct); |
45 |
1 |
assertEquals(struct, replaced); |
46 |
1 |
assertSame(struct, replaced); |
47 |
1 |
assertEquals("..{.([.<.].}.>)", |
48 |
|
AppVarna.replaceOddGaps("..{ ([*<-]?} >)")); |
49 |
1 |
assertEquals("....", AppVarna.replaceOddGaps("cgta")); |
50 |
1 |
assertEquals("", AppVarna.replaceOddGaps("")); |
51 |
1 |
assertNull(AppVarna.replaceOddGaps(null)); |
52 |
|
} |
53 |
|
} |