List of usage examples for org.springframework.context.support FileSystemXmlApplicationContext getBeanDefinitionCount
@Override public int getBeanDefinitionCount()
From source file:org.jaffre.springframework.JaffreExporterTestCase.java
public void test() throws Exception { final File l_fileAppContext; final FileSystemXmlApplicationContext l_appCtx; l_fileAppContext = PackageFile.get("test-resources/appcontext01.xml"); assertTrue(l_fileAppContext.isFile()); l_appCtx = new FileSystemXmlApplicationContext(l_fileAppContext.getPath()); l_appCtx.start();/* w ww . ja v a2 s. c om*/ assertEquals(6, l_appCtx.getBeanDefinitionCount()); assertNotNull(l_appCtx.getBean("jaffreClient")); assertNotNull(l_appCtx.getBean("jaffreServer")); assertNotNull(l_appCtx.getBean("jaffreConnector")); assertNotNull(l_appCtx.getBean("jaffreExporter")); assertNotNull(l_appCtx.getBean("throwException")); assertNotNull(l_appCtx.getBean("greeting")); l_appCtx.stop(); l_appCtx.close(); }