Package com.example.customerservice

Examples of com.example.customerservice.GetCustomersByName


        producer.sendBody(in);
        resultEndpoint.assertIsSatisfied();
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        Object body = exchange.getIn().getBody();
        Assert.assertEquals(GetCustomersByName.class, body.getClass());
        GetCustomersByName request = (GetCustomersByName) body;
        Assert.assertEquals("Smith", request.getName());
    }
View Full Code Here


    protected ProducerTemplate producer;

    @Test
    public void testRoundTrip() throws IOException, InterruptedException {
        resultEndpoint.expectedMessageCount(1);
        GetCustomersByName request = new GetCustomersByName();
        request.setName("Mueller");
        producer.sendBody(request);
        resultEndpoint.assertIsSatisfied();
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        GetCustomersByName received = exchange.getIn().getBody(
                GetCustomersByName.class);
        Assert.assertNotNull(received);
        Assert.assertEquals("Mueller", received.getName());
    }
View Full Code Here

        producer.sendBody(in);
        resultEndpoint.assertIsSatisfied();
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        Object body = exchange.getIn().getBody();
        Assert.assertEquals(GetCustomersByName.class, body.getClass());
        GetCustomersByName request = (GetCustomersByName) body;
        Assert.assertEquals("Smith", request.getName());
    }
View Full Code Here

    CustomerService customerService;

    @Test
    public void testRoundTrip() throws Exception {
        GetCustomersByNameResponse response = customerService
                .getCustomersByName(new GetCustomersByName());

        Assert.assertEquals(1, response.getReturn().size());
        Customer firstCustomer = response.getReturn().get(0);
        Assert.assertEquals(100000.0, firstCustomer.getRevenue());
    }
View Full Code Here

    @Produce(uri = "direct:camelClient")
    CustomerService customerServiceProxy;

    @Test
    public void testSuccess() throws NoSuchCustomerException {
        GetCustomersByName request = new GetCustomersByName();
        request.setName("test");
        GetCustomersByNameResponse response = customerServiceProxy.getCustomersByName(request);
        Assert.assertNotNull(response);
        List<Customer> customers = response.getReturn();
        Assert.assertEquals(1, customers.size());
        Assert.assertEquals("test", customers.get(0).getName());
View Full Code Here

        Assert.assertEquals("test", customers.get(0).getName());
    }

    @Test
    public void testFault() {
        GetCustomersByName request = new GetCustomersByName();
        request.setName("none");
        try {
            customerServiceProxy.getCustomersByName(request);
            Assert.fail("NoSuchCustomerException expected");
        } catch (NoSuchCustomerException e) {
            NoSuchCustomer info = e.getFaultInfo();
View Full Code Here

    protected ProducerTemplate producer;

    @Test
    public void testRoundTrip() throws IOException, InterruptedException {
        resultEndpoint.expectedMessageCount(1);
        GetCustomersByName request = new GetCustomersByName();
        request.setName("M�ller");
        producer.sendBody(request);
        resultEndpoint.assertIsSatisfied();
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        GetCustomersByName received = exchange.getIn().getBody(
                GetCustomersByName.class);
        Assert.assertNotNull(received);
        Assert.assertEquals("M�ller", received.getName());
    }
View Full Code Here

    @Resource(name = "customerServiceCxfProxy")
    protected CustomerService customerService;

    @Test
    public void testSuccess() throws NoSuchCustomerException {
        GetCustomersByName request = new GetCustomersByName();
        request.setName("test");
        GetCustomersByNameResponse response = customerService.getCustomersByName(request);
        Assert.assertNotNull(response);
        List<Customer> customers = response.getReturn();
        Assert.assertEquals(1, customers.size());
        Assert.assertEquals("test", customers.get(0).getName());
View Full Code Here

        Assert.assertEquals("test", customers.get(0).getName());
    }

    @Test
    public void testFault() {
        GetCustomersByName request = new GetCustomersByName();
        request.setName("none");
        try {
            customerService.getCustomersByName(request);
            Assert.fail("NoSuchCustomerException expected");
        } catch (NoSuchCustomerException e) {
            NoSuchCustomer info = e.getFaultInfo();
View Full Code Here

    protected ProducerTemplate producer;

    @Test
    public void testRoundTrip() throws IOException, InterruptedException {
        resultEndpoint.expectedMessageCount(1);
        GetCustomersByName request = new GetCustomersByName();
        request.setName("M�ller");
        producer.sendBody(request);
        resultEndpoint.assertIsSatisfied();
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        GetCustomersByName received = exchange.getIn().getBody(
                GetCustomersByName.class);
        Assert.assertNotNull(received);
        Assert.assertEquals("M�ller", received.getName());
    }
View Full Code Here

TOP

Related Classes of com.example.customerservice.GetCustomersByName

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.