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