Examples of ContextRefreshedEvent


Examples of org.springframework.context.event.ContextRefreshedEvent

      assertFalse(declarable.isInitialized());
      assertFalse(doPostInitCalled.get());
      assertSame(parameters, declarable.nullSafeGetParameters());

      initializer.onApplicationEvent(new ContextRefreshedEvent(mockApplicationContext));

      assertTrue(declarable.isInitialized());
      assertTrue(doPostInitCalled.get());
      declarable.assertEquals(parameters);
      declarable.assertSame(mockBeanFactory);

      declarable.destroy();
      doPostInitCalled.set(false);

      assertFalse(declarable.isInitialized());
      assertFalse(doPostInitCalled.get());
      assertNotSame(parameters, declarable.nullSafeGetParameters());

      initializer.onApplicationEvent(new ContextRefreshedEvent(mockApplicationContext));

      assertFalse(declarable.isInitialized());
      assertFalse(doPostInitCalled.get());
    }
    finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.