Examples of TestScopeApplicationContext


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

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

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

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

        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

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

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

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

        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

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

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

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

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

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

        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

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

        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

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

                "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
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.