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

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


     * {@inheritDoc}
     */
    @Override
    public RemoteTestScopeApplicationContext createApplicationContext(TestClass testClass) {

        return new RemoteTestScopeApplicationContext(getApplicationContext(testClass), true);
    }
View Full Code Here


        // given
        applicationContextDataSourceProvider = new ApplicationContextDataSourceProvider();

        bind(ApplicationScoped.class, RemoteTestScopeApplicationContext.class,
                new RemoteTestScopeApplicationContext(applicationContext, new TestClass(this.getClass()), false));

        getManager().inject(applicationContextDataSourceProvider);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public RemoteTestScopeApplicationContext createApplicationContext(TestClass testClass) {

        return new RemoteTestScopeApplicationContext(getApplicationContext(testClass), testClass, true);
    }
View Full Code Here

            return;
        }

        // creates the application context instance
        RemoteTestScopeApplicationContext applicationContext = createApplicationContext(testClass);

        if (applicationContext != null) {

            // triggers the application context created event
            applicationContextEvent.fire(new ApplicationContextCreatedEvent(applicationContext));
View Full Code Here

    /**
     * <p>Destroys the application context if it exists.</p>
     */
    private void destroyTestApplicationContext() {
        RemoteTestScopeApplicationContext applicationContext = getApplicationContext();

        if (applicationContext != null) {
            destroyApplicationContext(applicationContext);

            // triggers the application context destroyed event
View Full Code Here

        when(mockPlatformTransactionManager.getTransaction(any(TransactionDefinition.class)))
                .thenReturn(mockTransactionStatus);

        mockTestScopeApplicationContextInstance = mock(Instance.class);
        when(mockTestScopeApplicationContextInstance.get())
                .thenReturn(new RemoteTestScopeApplicationContext(mockApplicationContext, testClass, false));

        mockPlatformTransactionManagerInstance = mock(InstanceProducer.class);
        mockTransactionStatusInstance = mock(InstanceProducer.class);

        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance",
View Full Code Here

            throw new RuntimeException(String.format(
                    "The method %s returned null as a application context.", customContextMethods[0].getName()));
        }

        // creates new instance of application context
        return new RemoteTestScopeApplicationContext(applicationContext, testClass, true);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public RemoteTestScopeApplicationContext createApplicationContext(TestClass testClass) {

        return new RemoteTestScopeApplicationContext(getWebApplicationContext(testClass), testClass, false);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public RemoteTestScopeApplicationContext createApplicationContext(TestClass testClass) {

        return new RemoteTestScopeApplicationContext(getApplicationContext(testClass), testClass, true);
    }
View Full Code Here

        for (RemoteApplicationContextProducer applicationContextProducer : applicationContextProducers) {

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

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

                if (applicationContext != null) {

                    testApplicationContext.set(applicationContext);
View Full Code Here

TOP

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

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.