Examples of EnvironmentService


Examples of org.constretto.spring.factorybean.helper.EnvironmentService

public class ConstrettoSingletonFactoryBeanTest extends AbstractJUnit4SpringContextTests {

    @Test(expected = BeanCreationException.class)
    public void givenNoStageOnStartupAndNoDefaultThenThenThrowBeanCreationException() throws Exception {
        System.clearProperty(ASSEMBLY_KEY);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean");
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test
    public void givenNoStageOnStartupWithDefaultThenDefaultBeanIsSelected() throws Exception {
        System.clearProperty(ASSEMBLY_KEY);
        EnvironmentService testBeanOverriddenDefaultPrefix = (EnvironmentService) applicationContext
                .getBean("testBeanOverriddenDefaultBean");
        assertEquals(DevelopmentTestBean.class, testBeanOverriddenDefaultPrefix.getClass());
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test
    public void givenDevelopmentStageOnStartupThenDevelopmentBeanIsSelected() throws Exception {
        System.setProperty(ASSEMBLY_KEY, DEVELOPMENT);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean");
        assertEquals(DevelopmentTestBean.class, testBean.getClass());
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test
    public void givenDevelopmentFirstStageOnStartupThenDevelopmentBeanIsSelected() throws Exception {
        System.setProperty(ASSEMBLY_KEY, DEVELOPMENT + "," + PRODUCTION);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean");
        assertEquals(DevelopmentTestBean.class, testBean.getClass());
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test
    public void givenProductionFirstStageOnStartupThenProductionBeanIsSelected() throws Exception {
        System.setProperty(ASSEMBLY_KEY, PRODUCTION + "," + DEVELOPMENT);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean");
        assertEquals(ProductionTestBean.class, testBean.getClass());
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test(expected = BeanCreationException.class)
    public void givenUnknownStageOnStartupAndNoDefaultThenThrowBeanCreationException() throws Exception {
        System.setProperty(ASSEMBLY_KEY, TEST);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBean");
        assertEquals(DevelopmentTestBean.class, testBean.getClass());
    }
View Full Code Here

Examples of org.constretto.spring.factorybean.helper.EnvironmentService

    }

    @Test
    public void givenUnknownStageOnStartupWithDefaultThenDefaultIsSelected() throws Exception {
        System.setProperty(ASSEMBLY_KEY, TEST);
        EnvironmentService testBean = (EnvironmentService) applicationContext.getBean("testBeanOverriddenDefaultBean");
        assertEquals(DevelopmentTestBean.class, testBean.getClass());
    }
View Full Code Here

Examples of org.wildfly.extension.gravia.service.EnvironmentService

    protected ServiceController<ResourceInstaller> getResourceInstallService(OperationContext context, ServiceVerificationHandler verificationHandler) {
        return new WildFlyResourceInstaller().install(context.getServiceTarget(), verificationHandler);
    }

    protected ServiceController<Environment> getRuntimeEnvironmentService(OperationContext context, ServiceVerificationHandler verificationHandler) {
        return new EnvironmentService().install(context.getServiceTarget(), verificationHandler);
    }
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.