Examples of FullCustomerDto


Examples of org.company.recordshop.service.dto.FullCustomerDto

    List<Customer> all = customerServiceModelDomainService
        .listAllCustomers();
    List<FullCustomerDto> result = new ArrayList<FullCustomerDto>();

    for (Customer object : all) {
      FullCustomerDto item = fullCustomerDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    List<Customer> range = customerServiceModelDomainService.listCustomers(
        firstResult, maxResults);
    List<FullCustomerDto> result = new ArrayList<FullCustomerDto>();

    for (Customer object : range) {
      FullCustomerDto item = fullCustomerDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    List<Customer> range = customerServiceModelDomainService.listCustomers(
        firstResult, maxResults, sortProperty, isAscending);
    List<FullCustomerDto> result = new ArrayList<FullCustomerDto>();

    for (Customer object : range) {
      FullCustomerDto item = fullCustomerDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

        .exampleFromDto(filter);
    found = customerServiceModelDomainService
        .findCustomerByExample(example);

    for (Customer object : found) {
      FullCustomerDto item = fullCustomerDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

        .findCustomerByExampleCount(example, firstResult, maxResults,
            sortProperty, isAscending);
    List<FullCustomerDto> result = new ArrayList<FullCustomerDto>();

    for (Customer object : range) {
      FullCustomerDto item = fullCustomerDtoTranslator.toDto(object);
      result.add(item);
    }
    return result;
  }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    }

    @Test
    public final void testUpdateCustomerSucceed() {

        FullCustomerDto custDto = new FullCustomerDto();
        custDto.setFirstName("Johan");
        custDto.setLastName("Vogelzang");
        custDto.setCustomerNr(54321);
        custDto.setDiscountPercentage(0);
        custDto.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));

        Long customerId = customerServiceModelService.createCustomer(custDto);
        custDto = customerServiceModelService.readCustomerAsFullCustomerDto(customerId);
        flush();
        custDto.setDiscountPercentage(100);
        customerServiceModelService.updateCustomer(custDto);
        custDto = customerServiceModelService.readCustomerAsFullCustomerDto(customerId);
        assertTrue("DiscountPercentage should be 100", custDto.getDiscountPercentage() == 100);
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    @Test
    @ExpectedException(IllegalArgumentException.class)
    public final void testUpdateCustomerFail() {

        FullCustomerDto custDto = new FullCustomerDto();
        customerServiceModelService.updateCustomer(custDto);
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    }

    @Test
    public final void testDeleteCustomer() {

        FullCustomerDto custDto = new FullCustomerDto();
        custDto.setFirstName("Nasty");
        custDto.setLastName("Customer");
        custDto.setCustomerNr(666);
        custDto.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));

        Long id = customerServiceModelService.createCustomer(custDto);
        FullCustomerDto result = customerServiceModelService.readCustomerAsFullCustomerDto(id);
        customerServiceModelService.deleteCustomer(result);
        result = customerServiceModelService.readCustomerAsFullCustomerDto(id);
        assertTrue("result value should be null", result == null);
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

    }

    @Test
    @ExpectedException(IllegalArgumentException.class)
    public final void testDeleteCustomerFail() {
        FullCustomerDto zombieDto = new FullCustomerDto();
        customerServiceModelService.deleteCustomer(zombieDto);
    }
View Full Code Here

Examples of org.company.recordshop.service.dto.FullCustomerDto

  public void nullTarget() {
    // 'random' DTO translator
    FullCustomerDtoTranslator fullCustomerDtoTranslator = new FullCustomerDtoTranslator();

    Customer target = new Customer("a", "b", new DateTime(), 0);
    FullCustomerDto source = new FullCustomerDto(null, 1);
    source.setCustomerNr(1);
    source.setFirstName("Vincent");
    source.setLastName("van Gogh");
    source.setBirthDate(new DateTime("1953-03-30"));
    fullCustomerDtoTranslator.fromDto(source, target);
  }
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.