org.springframework.context.support.AbstractRefreshableApplicationContext Java Examples
The following examples show how to use
org.springframework.context.support.AbstractRefreshableApplicationContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BusApplicationListenerTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void testParentApplicationEvent() { AbstractRefreshableApplicationContext parent = new ClassPathXmlApplicationContext(); parent.refresh(); SpringBusFactory factory = new SpringBusFactory(parent); Bus bus = factory.createBus(); CXFBusLifeCycleManager manager = bus.getExtension(CXFBusLifeCycleManager.class); BusLifeCycleListener listener = EasyMock.createMock(BusLifeCycleListener.class); manager.registerLifeCycleListener(listener); EasyMock.reset(listener); listener.preShutdown(); EasyMock.expectLastCall().times(1); listener.postShutdown(); EasyMock.expectLastCall().times(1); EasyMock.replay(listener); parent.close(); EasyMock.verify(listener); }
Example #2
Source File: NodeWebScripTest.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void setUp() throws Exception { super.setUp(); AbstractRefreshableApplicationContext ctx = (AbstractRefreshableApplicationContext)getServer().getApplicationContext(); this.retryingTransactionHelper = (RetryingTransactionHelper)ctx.getBean("retryingTransactionHelper"); this.authenticationService = (MutableAuthenticationService)ctx.getBean("AuthenticationService"); this.personService = (PersonService)ctx.getBean("PersonService"); this.siteService = (SiteService)ctx.getBean("SiteService"); this.nodeService = (NodeService)ctx.getBean("NodeService"); this.nodeArchiveService = (NodeArchiveService)ctx.getBean("nodeArchiveService"); this.checkOutCheckInService = (CheckOutCheckInService)ctx.getBean("checkOutCheckInService"); this.permissionService = (PermissionService)ctx.getBean("permissionService"); // Do the setup as admin AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); // Create a site TEST_SITE = createSite(TEST_SITE_NAME); // Create two users, one who's a site member createUser(USER_ONE, true); createUser(USER_TWO, false); // Do our tests by default as the first user who is a contributor AuthenticationUtil.setFullyAuthenticatedUser(USER_ONE); }
Example #3
Source File: SpringBootApacheGeodePeerCacheApplicationUnitTests.java From spring-boot-data-geode with Apache License 2.0 | 3 votes |
@Before public void setup() { //System.err.printf("ApplicationContext Type [%s]%n", ObjectUtils.nullSafeClassName(this.applicationContext)); assertThat(this.applicationContext).isInstanceOf(AbstractRefreshableApplicationContext.class); }