|
| 1 | +/* |
| 2 | + * Copyright 2002-2009 the original author or authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package org.springframework.beans.factory.xml; |
| 18 | + |
| 19 | +import static org.junit.Assert.assertEquals; |
| 20 | +import org.junit.Test; |
| 21 | +import test.beans.ITestBean; |
| 22 | + |
| 23 | +import org.springframework.context.ApplicationContext; |
| 24 | +import org.springframework.context.support.ClassPathXmlApplicationContext; |
| 25 | + |
| 26 | +/** |
| 27 | + * Tests for combining the expression language and the p namespace. This test |
| 28 | + * |
| 29 | + * @author Arjen Poutsma |
| 30 | + */ |
| 31 | +public class SimplePropertyNamespaceHandlerWithExpressionLanguageTests { |
| 32 | + |
| 33 | + @Test |
| 34 | + public void combineWithExpressionLanguage() { |
| 35 | + ApplicationContext applicationContext = |
| 36 | + new ClassPathXmlApplicationContext("simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml", |
| 37 | + getClass()); |
| 38 | + ITestBean foo = applicationContext.getBean("foo", ITestBean.class); |
| 39 | + ITestBean bar = applicationContext.getBean("bar", ITestBean.class); |
| 40 | + assertEquals("Invalid name", "Baz", foo.getName()); |
| 41 | + assertEquals("Invalid name", "Baz", bar.getName()); |
| 42 | + } |
| 43 | + |
| 44 | +} |
0 commit comments