Package org.jboss.arquillian.spring.integration.context

Examples of org.jboss.arquillian.spring.integration.context.TestScopeApplicationContext


        testClass = new TestClass(StrategyTest.class);

        ClassPathXmlApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("testApplicationContext.xml");

        TestScopeApplicationContext testScopeApplicationContext =
                new TestScopeApplicationContext(applicationContext, testClass, true);

        instance = new MockAbstractSpringInjectionEnricher();
        ((MockAbstractSpringInjectionEnricher)instance).setTestScopeApplicationContext(testScopeApplicationContext);
    }
View Full Code Here


     */
    @Test
    public void testCreateApplicationContextDefault() {
        TestClass testClass = new TestClass(XmlAnnotatedClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

        properties.put("customContextClass", "org.springframework.context.support.ClassPathXmlApplicationContext");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

        setRemoteConfiguration();

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

     */
    @Test
    public void testCreateApplicationContextCustomContext() {
        TestClass testClass = new TestClass(XmlAnnotatedCustomContextClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

        properties.put("customContextClass", "invalid class name");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

        setRemoteConfiguration();

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

     */
    @Test
    public void testCreateApplicationContextDefault() {
        TestClass testClass = new TestClass(CustomApplicationContextClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

     */
    @Test
    public void testCreateApplicationContextDefault() {
        TestClass testClass = new TestClass(ClientXmlAnnotatedClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

        for (ApplicationContextProducer applicationContextProducer : applicationContextProducers) {

            if (applicationContextProducer.supports(beforeClass.getTestClass())) {

                TestScopeApplicationContext applicationContext =
                        applicationContextProducer.createApplicationContext(beforeClass.getTestClass());

                if (applicationContext != null) {

                    testApplicationContext.set(applicationContext);
View Full Code Here

        Map<String, String> properties = new HashMap<String, String>();
        properties.put("customAnnotationContextClass",
                "org.springframework.context.annotation.AnnotationConfigApplicationContext");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

                "org.springframework.context.annotation.AnnotationConfigApplicationContext");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

        setUpRemoteConfiguration();

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
        assertNotNull("The application context hasn't been created.", result.getApplicationContext());
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spring.integration.context.TestScopeApplicationContext

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.