Package org.jboss.arquillian.spring.deployer.configuration

Examples of org.jboss.arquillian.spring.deployer.configuration.SpringDeployerConfiguration


     */
    @Test
    public void testInitDependencyResolverCached() throws Exception {
        BeforeSuite event = new BeforeSuite();

        SpringDeployerConfiguration configuration = new SpringDeployerConfiguration();
        configuration.setEnableCache(true);

        Instance<SpringDeployerConfiguration> mockConfigurationInstance = mock(Instance.class);
        when(mockConfigurationInstance.get()).thenReturn(configuration);
        TestReflectionHelper.setFieldValue(instance, "configuration", mockConfigurationInstance);

View Full Code Here


     * <p>Tests {@link Spring3DependencyResolver#resolveDependencies()} method.</p>
     */
    @Test
    public void testResolveDependencies() {

        SpringDeployerConfiguration springDeployerConfiguration = createConfiguration();
        springDeployerConfiguration.setImportPomDependencies(false);
        springDeployerConfiguration.setIncludeSnowdrop(false);

        instance = new Spring3DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * <p>Tests {@link Spring3DependencyResolver#resolveDependencies()} method when maven is run in offline mode.</p>
     */
    @Test
    public void testResolveDependenciesOffline() {

        SpringDeployerConfiguration springDeployerConfiguration = createConfiguration();
        springDeployerConfiguration.setImportPomDependencies(false);
        springDeployerConfiguration.setIncludeSnowdrop(false);
        springDeployerConfiguration.setUseMavenOffline(true);

        instance = new Spring3DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * <p>Tests {@link Spring3DependencyResolver#resolveDependencies()} method.</p>
     */
    @Test
    public void testResolveDependenciesIncludeSnowdrop() {

        SpringDeployerConfiguration springDeployerConfiguration = createConfiguration();

        instance = new Spring3DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * @return the create instance of {@link SpringDeployerConfiguration}
     */
    private SpringDeployerConfiguration createConfiguration() {
        File pomFile = new File(".", "src/test/resources/pom.xml");

        SpringDeployerConfiguration springDeployerConfiguration = new SpringDeployerConfiguration();
        springDeployerConfiguration.setPomFile(pomFile.getAbsolutePath());
        springDeployerConfiguration.setAutoPackaging(true);
        springDeployerConfiguration.setSpringVersion("3.1.1.RELEASE");
        springDeployerConfiguration.setCglibVersion("2.2.2");
        springDeployerConfiguration.setIncludeSnowdrop(true);
        return springDeployerConfiguration;
    }
View Full Code Here

     * @param beforeSuiteEvent the event fired before execution of the test suite
     */
    public void initConfiguration(@Observes(precedence = SpringDeployerConstants.DEFAULT_PRECEDENCE)
                                  BeforeSuite beforeSuiteEvent) {

        SpringDeployerConfiguration config = getConfiguration(descriptor);

        deployerConfiguration.set(config);
    }
View Full Code Here

     */
    private SpringDeployerConfiguration getConfiguration(Instance<ArquillianDescriptor> descriptor) {

        Map<String, String> properties = getExtensionProperties(descriptor.get());

        SpringDeployerConfiguration result = new SpringDeployerConfiguration();
        result.setAutoPackaging(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_AUTO_PACKAGE, true));
        result.setSpringVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_SPRING_VERSION, null));
        result.setCglibVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_CGLIB_VERSION, null));
        result.setIncludeSnowdrop(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_INCLUDE_SNOWDROP, false));
        result.setSnowdropVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_SNOWDROP_VERSION, null));

        return result;
    }
View Full Code Here

     * @param beforeSuiteEvent the event fired before execution of the test suite
     */
    public void initConfiguration(@Observes(precedence = SpringDeployerConstants.DEFAULT_PRECEDENCE)
                                  BeforeSuite beforeSuiteEvent) {

        SpringDeployerConfiguration config = getConfiguration(descriptor);

        deployerConfiguration.set(config);
    }
View Full Code Here

     */
    private SpringDeployerConfiguration getConfiguration(Instance<ArquillianDescriptor> descriptor) {

        Map<String, String> properties = getExtensionProperties(descriptor.get());

        SpringDeployerConfiguration result = new SpringDeployerConfiguration();
        result.setAutoPackaging(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_AUTO_PACKAGE, true));

        result.setEnableCache(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_ENABLE_CACHE, true));
        result.setUseMavenOffline(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_USE_MAVEN_OFFLINE, false));
        result.setImportPomDependencies(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_IMPORT_POM_DEPENDENCIES, true));
        result.setPomFile(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_POM_FILE,
                SpringDeployerConstants.POM_XML));
        result.setSpringVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_SPRING_VERSION, null));
        result.setCglibVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_CGLIB_VERSION, null));
        result.setIncludeSnowdrop(getBooleanProperty(properties,
                SpringDeployerConstants.CONFIGURATION_INCLUDE_SNOWDROP, false));
        result.setSnowdropVersion(getStringProperty(properties,
                SpringDeployerConstants.CONFIGURATION_SNOWDROP_VERSION, null));

        return result;
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spring.deployer.configuration.SpringDeployerConfiguration

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.