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

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


     * <p>Tests the {@link AbstractDependencyResolver# method.</p>
     */
    @Test
    public void testCtor() {

        SpringDeployerConfiguration deployerConfiguration = new SpringDeployerConfiguration();

        instance = new MockDependencyResolver(deployerConfiguration);
    }
View Full Code Here


     * <p>Tests the {@link AbstractDependencyResolver#getConfiguration()}  method.</p>
     */
    @Test
    public void testGetConfiguration() {

        SpringDeployerConfiguration deployerConfiguration = new SpringDeployerConfiguration();

        instance = new MockDependencyResolver(deployerConfiguration);

        assertEquals("Invalid result has been returned.", deployerConfiguration, instance.getConfiguration());
    }
View Full Code Here

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

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

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

View Full Code Here

     */
    @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);

        InstanceProducer<AbstractDependencyResolver> mockProducer = mock(InstanceProducer.class);
View Full Code Here

     * @throws IOException if any error occurs
     */
    @Test
    public void testResolveDependencies() throws IOException {

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

        instance = new Spring25DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * @throws IOException if any error occurs
     */
    @Test
    public void testResolveDependenciesOffline() throws IOException {

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

        instance = new Spring25DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * @throws IOException if any error occurs
     */
    @Test
    public void testResolveDependenciesIncludeSnowdrop() throws IOException {

        SpringDeployerConfiguration springDeployerConfiguration = createConfiguration();

        instance = new Spring25DependencyResolver(springDeployerConfiguration);

        File[] files = instance.resolveDependencies();

View Full Code Here

     * @return the create instance of {@link SpringDeployerConfiguration}
     */
    private SpringDeployerConfiguration createConfiguration() throws IOException {
        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 autoPackage will be used as the value return by extension configuration injected into the test instance
     *
     * @throws Exception if any error occurs
     */
    private void injectConfiguration(boolean autoPackage) throws Exception {
        SpringDeployerConfiguration deployerConfiguration = new SpringDeployerConfiguration();
        deployerConfiguration.setAutoPackaging(autoPackage);

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

View Full Code Here

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

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

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

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.