Examples of Customer


Examples of org.apache.camel.converter.dozer.service.Customer

    @Test
    public void verifyCustomerMapping() throws Exception {

        Mapper mapper = DozerTestArtifactsFactory.createMapper();
        Customer service = createServiceCustomer();
        org.apache.camel.converter.dozer.model.Customer model = mapper.map(service, org.apache.camel.converter.dozer.model.Customer.class);
        Customer roundTrip = mapper.map(model, Customer.class);
        assertEquals(service, roundTrip);
    }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.model.simple.oneclassandtrimandclip.Customer

        result.assertIsSatisfied();
    }

    public Object generateModel() {
        Customer customer = new Customer();
        customer.setSalutation("Mr");
        customer.setFirstName(" John ");
        customer.setLastName("Doeeeeeeeeeeeee");
        customer.setCity("Cityyyyyyy     ");
        return customer;
    }
View Full Code Here

Examples of org.apache.camel.examples.Customer

   
    @Test
    public void produceNewEntity() throws Exception {
        setUp("jpa://" + Customer.class.getName() + "?usePersist=" + (usePersist() ? "true" : "false"));
       
        Customer customer = createDefaultCustomer();
        Customer receivedCustomer = template.requestBody(endpoint, customer, Customer.class);
       
        assertEquals(customer.getName(), receivedCustomer.getName());
        assertNotNull(receivedCustomer.getId());
        assertEquals(customer.getAddress().getAddressLine1(), receivedCustomer.getAddress().getAddressLine1());
        assertEquals(customer.getAddress().getAddressLine2(), receivedCustomer.getAddress().getAddressLine2());
        assertNotNull(receivedCustomer.getAddress().getId());
       
        List<?> results = entityManager.createQuery("select o from " + Customer.class.getName() + " o").getResultList();
        assertEquals(1, results.size());
        Customer persistedCustomer = (Customer) results.get(0);
        assertEquals(receivedCustomer.getName(), persistedCustomer.getName());
        assertEquals(receivedCustomer.getId(), persistedCustomer.getId());
        assertEquals(receivedCustomer.getAddress().getAddressLine1(), persistedCustomer.getAddress().getAddressLine1());
        assertEquals(receivedCustomer.getAddress().getAddressLine2(), persistedCustomer.getAddress().getAddressLine2());
        assertEquals(receivedCustomer.getAddress().getId(), persistedCustomer.getAddress().getId());
    }
View Full Code Here

Examples of org.apache.camel.itest.osgi.dozer.service.Customer

        mock.message(0).simple("${body.firstName} == Homer");
        mock.message(0).simple("${body.lastName} == Simpson");
        mock.message(0).simple("${body.address.streetMame} == 'Somestreet 123'");
        mock.message(0).simple("${body.address.zipCode} == 26000");

        Customer serviceCustomer = new Customer();
        serviceCustomer.setFirstName("Homer");
        serviceCustomer.setLastName("Simpson");
        serviceCustomer.setStreet("Somestreet 123");
        serviceCustomer.setZip("26000");

        template.sendBody("direct:start", serviceCustomer);

        assertMockEndpointsSatisfied();
    }
View Full Code Here

Examples of org.apache.click.examples.domain.Customer

    /**
     * @see org.apache.click.Page#onPost()
     */
    @Override
    public void onPost() {
        Customer customer = null;
        String value = textField.getValue().trim();
        String type = typeSelect.getValue().toLowerCase();

        if (type.equals("id")) {
            if (NumberUtils.isDigits(value)) {
View Full Code Here

Examples of org.apache.commons.jelly.core.Customer

        Script script = getJelly().compileScript();
        getJellyContext().setVariable("test.simpleNew",Boolean.TRUE);
        script.run(getJellyContext(),getXMLOutput());
        assertNotNull(getJellyContext().getVariable("foo"));
        assertTrue(getJellyContext().getVariable("foo") instanceof Customer);
        Customer customer = (Customer)(getJellyContext().getVariable("foo"));
        assertNull(customer.getName());
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.Customer

public class CustomerService {
    long currentId = 1;
    Map<Long, Customer> customers = new HashMap<Long, Customer>();

    public CustomerService() {
        Customer customer = createCustomer();
        customers.put(customer.getId(), customer);
    }
View Full Code Here

Examples of org.apache.cxf.customer.Customer

   
    @Resource
    private WebServiceContext context;
   
    public CustomerService() {
        Customer customer = createCustomer();
        customers.put(customer.getId(), customer);
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.Customer

   
    @Test
    public void testInjectApplicationInSingleton() throws Exception {
        CustomerApplication app = new CustomerApplication();
        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
        Customer customer = new Customer();
        sf.setServiceBeanObjects(customer);
        sf.setApplication(app);
        sf.setStart(false);
        Server server = sf.create()
        assertSame(app, customer.getApplication1());
        assertSame(app, customer.getApplication2());
        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
        assertNotNull(proxy);
        invokeCustomerMethod(sf.getServiceFactory().getClassResourceInfo().get(0),
                             customer, server);
        assertSame(app, customer.getApplication2());
        assertTrue(proxy.get() instanceof UriInfo);
    }
View Full Code Here

Examples of org.apache.derbyTesting.system.oe.model.Customer

            ResultSet rs = osCustomerByName.executeQuery();
            int n = 0;
            List list = new ArrayList();
            while (rs.next())
            {
                Customer customer = new Customer();
                customer.setWarehouse(w);
                customer.setDistrict(d);
                customer.setLast(customerLast);
               
                customer.setId(rs.getInt("C_ID"));
                customer.setBalance(rs.getString("C_BALANCE"));
                customer.setFirst(rs.getString("C_FIRST"));
                customer.setMiddle(rs.getString("C_MIDDLE"));
               
                list.add(customer);
            }
            reset(osCustomerByName);
            if (list.isEmpty())
                throw new SQLException("Order Status by name - no matching customer "
                        + customerLast);
           
            // Customer to use is midpoint (with round up) (see 2.6.2.2)
            int mid = n/2;
            if (n%2 == 1)
                mid++;


            Customer customer = (Customer) list.get(mid);
            list = null;
           
            getOrderStatusForCustomer(display, displayData, true, customer);
        } catch (SQLException e) {
            conn.rollback();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.