Package com.example.customerservice

Examples of com.example.customerservice.GetCustomersByNameResponse


    @Produce(uri = "direct:start")
    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


    @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

        if ("none".equals(request.getName())) {
            NoSuchCustomer noSuchCustomer = new NoSuchCustomer();
            noSuchCustomer.setCustomerId(request.getName());
            throw new NoSuchCustomerException("Customer not found", noSuchCustomer);
        }
        GetCustomersByNameResponse response = new GetCustomersByNameResponse();
        Customer customer = new Customer();
        customer.setName(request.getName());
        customer.setRevenue(100000);
        response.getReturn().add(customer);
        return response;
    }
View Full Code Here

    @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

        if ("none".equals(request.getName())) {
            NoSuchCustomer noSuchCustomer = new NoSuchCustomer();
            noSuchCustomer.setCustomerId(request.getName());
            throw new NoSuchCustomerException("Customer not found", noSuchCustomer);
        }
        GetCustomersByNameResponse response = new GetCustomersByNameResponse();
        Customer customer = new Customer();
        customer.setName(request.getName());
        customer.setRevenue(100000);
        response.getReturn().add(customer);
        return response;
    }
View Full Code Here

    @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

    @Produce(uri = "direct:start")
    CustomerService customerService;

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

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

    @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

    @Produce(uri = "direct:start")
    CustomerService customerService;

    @Test
    public void testRoundTripGetCustomersByName() 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

    @Test
    @Ignore
    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

TOP

Related Classes of com.example.customerservice.GetCustomersByNameResponse

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.