1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.mchaplin.ioc.test;
21
22 import net.mchaplin.commons.i18n.PropertyResourceHelper;
23 import net.mchaplin.commons.i18n.PropertyResourceHelperI;
24 import junit.framework.TestCase;
25
26
27 /***
28 * @author matthieu
29 *
30 * $Header:
31 * $Revision:
32 * $Date:
33 *
34 */
35 public class PropertyResourceHelperTest extends TestCase {
36
37 private transient PropertyResourceHelperI props = null;
38
39
40
41
42 protected void runTest() throws Throwable {
43 super.runTest();
44 }
45
46
47
48 protected void setUp() throws Exception {
49 props = new PropertyResourceHelper();
50 }
51
52 public void testRetrieveMessage() {
53 String test = "unit-test";
54 assertEquals(test, props.getMessage("cim", "unit-test"));
55 }
56
57 public void testRetrieveMessageWithLocale() {
58 String test = "unit-test";
59 assertEquals(test, props.getMessage("cim", "unit-test", "fr_FR"));
60 }
61
62 }