Package com.netflix.governator.guice.actions

Examples of com.netflix.governator.guice.actions.CreateAllBoundSingletons


                    protected void configure() {
                        bind(ThisShouldBeEager.class);
                    }
                })
                .withPostInjectorAction(new BindingReport(testName))
                .withPostInjectorAction(new CreateAllBoundSingletons())
                .build()
                .createInjector();
           
            Assert.assertEquals(0,  ThisShouldBeLazy.counter.get());
            Assert.assertEquals(1,  ThisShouldBeEager.counter.get());
View Full Code Here


    public void testClassSingleton() {
        LifecycleInjector.builder()
            .inStage(Stage.DEVELOPMENT)
            .withMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS)
            .withPostInjectorAction(new BindingReport(testName))
            .withPostInjectorAction(new CreateAllBoundSingletons())
            .withModules(new AbstractModule() {
                @Override
                protected void configure() {
                    bind(FooImpl.class);
                }
View Full Code Here

   
    @Test
    public void testInterfaceSingleton() {
        LifecycleInjector.builder()
            .withPostInjectorAction(new BindingReport(testName))
            .withPostInjectorAction(new CreateAllBoundSingletons())
            .inStage(Stage.DEVELOPMENT)
            .withMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS)
            .withModules(new AbstractModule() {
                @Override
                protected void configure() {
View Full Code Here

   
    @Test
    public void testInterfaceSingletonProductionStage() {
        LifecycleInjector.builder()
            .withPostInjectorAction(new BindingReport(testName))
            .withPostInjectorAction(new CreateAllBoundSingletons())
            .withModules(new AbstractModule() {
                @Override
                protected void configure() {
                    bind(Foo.class).to(FooImpl.class);
                }
View Full Code Here

   
    @Test
    public void testScopedSingleton() {
        LifecycleInjector.builder()
            .withPostInjectorAction(new BindingReport(testName))
            .withPostInjectorAction(new CreateAllBoundSingletons())
            .inStage(Stage.DEVELOPMENT)
            .withMode(LifecycleInjectorMode.SIMULATED_CHILD_INJECTORS)
            .withModules(new AbstractModule() {
                @Override
                protected void configure() {
View Full Code Here

TOP

Related Classes of com.netflix.governator.guice.actions.CreateAllBoundSingletons

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.