Package org.jboss.arquillian.spring.integration.test.annotation

Examples of org.jboss.arquillian.spring.integration.test.annotation.SpringClientConfiguration


    @Test
    public void arrayWithCustomLocationShouldBeReturnedWhenBothDefaultAndCustomResourcesExist() {
        // given
        Class<ClientXmlAnnotatedClassWithBothCustomAndDefaultLocations> wrappedClass = ClientXmlAnnotatedClassWithBothCustomAndDefaultLocations.class;

        SpringClientConfiguration testClassAnnotation = wrappedClass.getAnnotation(SpringClientConfiguration.class);
        String[] expectedLocationNames = testClassAnnotation.value();

        // when
        String[] defaultLocations = locationsProcessor.processLocations(testClassAnnotation.value(), wrappedClass);

        // then
        assertThat(defaultLocations).hasSize(expectedLocationNames.length);
        assertThat(defaultLocations).containsOnly((Object[]) expectedLocationNames);
    }
View Full Code Here


     *
     * @return the created {@link ApplicationContext}
     */
    private ApplicationContext getApplicationContext(TestClass testClass) {

        SpringClientConfiguration springConfiguration =
                testClass.getAnnotation(SpringClientConfiguration.class);

        String [] locations = locationsProcessor.processLocations(springConfiguration.value(), testClass.getJavaClass());

        return new ClassPathXmlApplicationContext(locations);
    }
View Full Code Here

     *
     * @return the created {@link ApplicationContext}
     */
    private ApplicationContext getApplicationContext(TestClass testClass) {

        SpringClientConfiguration springConfiguration =
                testClass.getAnnotation(SpringClientConfiguration.class);

        String[] locations = new String[]{SpringInjectConstants.DEFAULT_LOCATION};
        if (springConfiguration.value().length > 0) {

            locations = springConfiguration.value();
        }

        return new ClassPathXmlApplicationContext(locations);
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spring.integration.test.annotation.SpringClientConfiguration

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.