1 /*
2 * Created on May 22, 2004
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * Full GNU LGPL license terms : http://www.gnu.org/copyleft/lesser.txt
15 *
16 * Project : iky-container
17 * Package : net.wmind.container.model
18 * Author : mchaplin@users.sourceforge.net
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 /* (non-Javadoc)
40 * @see junit.framework.TestCase#runTest()
41 */
42 protected void runTest() throws Throwable {
43 super.runTest();
44 }
45 /* (non-Javadoc)
46 * @see junit.framework.TestCase#setUp()
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 }