New SpringConfigurationTest; the first @RunWith(SpringJUnit4ClassRunner)

@ContextConfiguration in Mifos X. More of it to come - stay tuned.

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
This commit is contained in:
Michael Vorburger
2014-07-21 23:28:08 +02:00
parent 3f35a3e4cf
commit c30398d84a
6 changed files with 109 additions and 5 deletions
@@ -56,6 +56,11 @@
<import resource="infrastructure.xml" />
<!-- do NOT <import resource="jndi.xml" /> here;
because we want the TestDataSourceConfiguration to not have that;
we'll manually list jndi.xml in web.xml
-->
<import resource="securityContext.xml" />
<import resource="cache.xml" />
@@ -33,6 +33,4 @@
<property name="transactionManager" ref="transactionManager"></property>
</bean>
<jee:jndi-lookup jndi-name="java:comp/env/jdbc/mifosplatform-tenants"
id="tenantDataSourceJndi" />
</beans>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/. -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<!-- name here must match TestDataSourceConfiguration -->
<jee:jndi-lookup jndi-name="java:comp/env/jdbc/mifosplatform-tenants"
id="tenantDataSourceJndi" />
</beans>