Voici mon spring applicationContext

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
.....
<jee:jndi-lookup id="dataSource" jndi-name="myDS">
		<jee:environment>
			java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
			java.naming.provider.url=localhost:1099
	   		java.naming.factory.url.pkgs=org.jboss.naming
		</jee:environment>
	</jee:jndi-lookup>
</beans>
J'aimerais faire un test unitaire dessus pour valider mes dev.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
String[] springFiles = { "springApplicationContext.xml" };
	        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(springFiles);
	        DataSource   ds = (DataSource)applicationContext.getBean("dataSource");
	        Assert.assertNotNull(ds);
J'ai des erreurs de toute sorte, j'aimerais avoir un example.
Merci.