1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.util; |
22 |
|
|
23 |
|
import static org.testng.Assert.assertEquals; |
24 |
|
|
25 |
|
import org.testng.annotations.Test; |
26 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 3 |
Complexity Density: 0.5 |
|
27 |
|
public class MessageManagerTest |
28 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
29 |
1 |
@Test(groups = "Functional")... |
30 |
|
public void testFormatMessage_invalid() |
31 |
|
{ |
32 |
1 |
String msg = MessageManager.formatMessage("label.rubbish", "goodbye", |
33 |
|
"world"); |
34 |
1 |
assertEquals(msg, "[missing key] label.rubbish 'goodbye' 'world'"); |
35 |
|
} |
36 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
37 |
1 |
@Test(groups = "Functional")... |
38 |
|
public void testGetString_invalid() |
39 |
|
{ |
40 |
1 |
String msg = MessageManager.getString("label.rubbish"); |
41 |
1 |
assertEquals(msg, "[missing key] label.rubbish"); |
42 |
|
} |
43 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
44 |
1 |
@Test(groups = "Functional")... |
45 |
|
public void testGetStringOrReturn() |
46 |
|
{ |
47 |
1 |
String msg = MessageManager.getStringOrReturn("label.rubbish", |
48 |
|
"rubbishdefault"); |
49 |
1 |
assertEquals(msg, "rubbishdefault"); |
50 |
|
} |
51 |
|
} |