Package org.apache.camel.component.cxf.spring

Examples of org.apache.camel.component.cxf.spring.SpringJAXRSServerFactoryBean


public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
       
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
       
        Map<String, Object> endpointProps = sfb.getProperties();
        // The beanId key is put by the AbstractCxfBeanDefinitionParser, so the size is 2
        assertEquals("Single endpoint property is expected", 2, endpointProps.size());
        assertEquals("Wrong property value", "aValue", endpointProps.get("aKey"));
    }
View Full Code Here


public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
       
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
       
        Map<String, Object> endpointProps = sfb.getProperties();
        // The beanId key is put by the AbstractCxfBeanDefinitionParser, so the size is 2
        assertEquals("Single endpoint property is expected", 2, endpointProps.size());
        assertEquals("Wrong property value", "aValue", endpointProps.get("aKey"));
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
    }
View Full Code Here

        cfb.setThreadSafe(true);
    }
   
    @Override
    protected JAXRSServerFactoryBean newJAXRSServerFactoryBean() {
        return new SpringJAXRSServerFactoryBean();
    }
View Full Code Here

        }
        cfb.setThreadSafe(true);
    }

    public JAXRSServerFactoryBean createJAXRSServerFactoryBean() {
        JAXRSServerFactoryBean answer = new SpringJAXRSServerFactoryBean();
        setupJAXRSServerFactoryBean(answer);
        return answer;
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classess", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
       
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
        assertEquals("Got a wrong size of interceptors", 1, sfb.getInInterceptors().size());
       
        Map<String, Object> endpointProps = sfb.getProperties();
        // The beanId key is put by the AbstractCxfBeanDefinitionParser, so the size is 2
        assertEquals("Single endpoint property is expected", 2, endpointProps.size());
        assertEquals("Wrong property value", "aValue", endpointProps.get("aKey"));
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classess", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
    }
View Full Code Here

public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateCxfRsServerFactoryBean() {
        CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
        SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
        assertEquals("Get a wrong provider size", 1, sfb.getProviders().size());
        assertEquals("Get a wrong beanId", sfb.getBeanId(), "rsServer");
        assertEquals("Get a wrong address", sfb.getAddress(), "http://localhost:9000/router");
        assertEquals("Get a wrong size of resource classes", sfb.getResourceClasses().size(), 1);
        assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
        assertEquals("Got the wrong loggingFeatureEnabled", true, sfb.isLoggingFeatureEnabled());
        assertEquals("Got the wrong loggingSizeLimit", 200, sfb.getLoggingSizeLimit());
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.cxf.spring.SpringJAXRSServerFactoryBean

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.