Package org.springframework.data.gemfire.support

Examples of org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer


        assertInitialized();
        doPostInitCalled.set(true);
      }
    };

    SpringContextBootstrappingInitializer initializer = new SpringContextBootstrappingInitializer();

    Properties parameters = createParameters("param", "value");

    try {
      declarable.init(parameters);

      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 {
      initializer.onApplicationEvent(new ContextClosedEvent(mockApplicationContext));
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer

Copyright © 2018 www.massapicom. 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.