@Test public void testGetClassPathXmlApplicationContextShouldCreateNewAppContext() { ClassPathXmlApplicationContext actual = underTest.getClassPathXmlApplicationContext(SPRING_APP_CONTEXT_PATH); Assert.assertTrue(actual.containsBean("test")); }
public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) { ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path); if (applicationContext == null) { applicationContext = new ClassPathXmlApplicationContext(path); applicationContexts.put(path, applicationContext); } return applicationContext; }
ApplicationContextFactory { public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) { ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path); if (applicationContext == null) { applicationContext = new ClassPathXmlApplicationContext(path); applicationContexts.put(path, applicationContext); } return applicationContext; } }
ApplicationContextFactory { public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) { ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path); if (applicationContext == null) { applicationContext = new ClassPathXmlApplicationContext(path); applicationContexts.put(path, applicationContext); } return applicationContext; } ApplicationContextFactory(); }
ApplicationContextFactory { public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) { ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path); if (applicationContext == null) { applicationContext = new ClassPathXmlApplicationContext(path); applicationContexts.put(path, applicationContext); } return applicationContext; } ApplicationContextFactory(); static ApplicationContextFactory getInstance(); ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path); ClassPathXmlApplicationContext getApplicationContext(final String springAppContextPath); }
ApplicationContextFactory { public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) { ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path); if (applicationContext == null) { applicationContext = new ClassPathXmlApplicationContext(path); applicationContexts.put(path, applicationContext); } return applicationContext; } ApplicationContextFactory(); static ApplicationContextFactory getInstance(); ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path); ClassPathXmlApplicationContext getApplicationContext(final String springAppContextPath);  }