1 package ch.elca.el4j.tests.env;
2 import java.util.Properties;
3
4 import org.junit.Assert;
5 import org.junit.Test;
6
7 import ch.elca.el4j.util.codingsupport.PropertiesHelper;
8 import ch.elca.el4j.util.env.EnvPropertiesUtils;
9
10
11 /*
12 * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
13 * the spring framework, http://el4j.sf.net
14 * Copyright (C) 2008 by ELCA Informatique SA, Av. de la Harpe 22-24,
15 * 1000 Lausanne, Switzerland, http://www.elca.ch
16 *
17 * EL4J is published under the GNU Lesser General Public License (LGPL)
18 * Version 2.1. See http://www.gnu.org/licenses/
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU Lesser General Public License for more details.
24 *
25 * For alternative licensing, please contact info@elca.ch
26 */
27
28 /**
29 * This class tests if all env placeholder could be evaluated properly.
30 *
31 * @svnLink $Revision: 3874 $;$Date: 2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/tests/env/plugin/legacyApp/src/test/java/ch/elca/el4j/tests/env/EnvPluginTest.java $
32 *
33 * @author Stefan Wismer (SWI)
34 */
35 public class EnvPluginTest {
36 /**
37 * Test if env properties file contains the expected values.
38 */
39 @Test
40 public void testEnvPropertiesFile() {
41 Properties envPlaceholderProperties = EnvPropertiesUtils.getEnvPlaceholderProperties();
42
43 PropertiesHelper helper = new PropertiesHelper();
44 Properties expectedProperties = helper.loadProperties("expected-env-placeholder.properties");
45
46 Assert.assertEquals(expectedProperties, envPlaceholderProperties);
47 }
48
49 }