Package com.example.customerservice

Examples of com.example.customerservice.Customer


        }
       
        // The implementation of updateCustomer is set to sleep for some seconds.
        // Still this method should return instantly as the method is declared
        // as a one way method in the WSDL
        Customer customer = new Customer();
        customer.setName("Smith");
        customerService.updateCustomer(customer);
       
        System.out.println("All calls were succesful");
    }
View Full Code Here


    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

            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

            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

    /**
     * This method is to test a call without input parameter
     */
    public GetAllCustomersResponse getAllCustomers() {
        GetAllCustomersResponse response = new GetAllCustomersResponse();
        Customer customer = new Customer();
        customer.setName("Smith");
        customer.setRevenue(100000);
        response.getReturn().add(customer);
        return response;
    }
View Full Code Here

    @Test
    public void testRoundTripGetAllCustomers() throws Exception {
        GetAllCustomersResponse response = customerService.getAllCustomers();
        Assert.assertEquals(1, response.getReturn().size());
        Customer firstCustomer = response.getReturn().get(0);
        Assert.assertEquals(100000.0, firstCustomer.getRevenue(), 0.00001);
    }
View Full Code Here

        Assert.assertEquals(100000.0, firstCustomer.getRevenue(), 0.00001);
    }

    @Test
    public void testRoundTripSaveCustomer() throws Exception {
        Customer testCustomer = new Customer();
        testCustomer.setName("testName");
        SaveCustomer request = new SaveCustomer();
        request.setCustomer(testCustomer);
        customerService.saveCustomer(request);
        Customer customer2 = serverBean.getLastSavedCustomer();
        Assert.assertEquals("testName", customer2.getName());
    }
View Full Code Here

    @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 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
    public void testRoundTripGetAllCustomers() throws Exception {
        GetAllCustomersResponse response = customerService.getAllCustomers();
        Assert.assertEquals(1, response.getReturn().size());
        Customer firstCustomer = response.getReturn().get(0);
        Assert.assertEquals(100000.0, firstCustomer.getRevenue(), 0.00001);
    }
View Full Code Here

TOP

Related Classes of com.example.customerservice.Customer

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.