Package com.expositds.ars.domain.user

Examples of com.expositds.ars.domain.user.Customer


 
  }

  @Test
  public void addCorporateCustomerTest() {
    Customer corporateCustomer = new CorporateCustomer("13-ED1",
        "XUTIH_PYJLO_CORP");
    corporateCustomer.setApartment((short) 10);
    corporateCustomer.setCity("TestCorp");
    corporateCustomer.setCountry("TestCorp");
    corporateCustomer.setEmail("testCorp@email.com");
    corporateCustomer.setHouse((short) 3);
    corporateCustomer.setHousing(null);
    corporateCustomer.setName("TestCorp");
    corporateCustomer.setPassword("TESTCorp");
    corporateCustomer.setPatronymic("TestovichCorp");
    corporateCustomer.setPhone("5345399");
    corporateCustomer.setProvince("TestCorp");
    corporateCustomer.setRole(EUserRole.CUSTOMER);
    corporateCustomer.setStreet("TestCorp");
    corporateCustomer.setSurname("TestovCorp");
    corporateCustomer.setZip("223744");

    Long id = customerService.addCustomer(corporateCustomer);
    corporateCustomer = customerService.getCustomerById(id);
  }
View Full Code Here


    CarEntity carEntity = carRepository.findByVehicleRegNo("AB2331");
    Car car = DozerHelper.map(carEntity, Car.class);

    log.info("Getting customer entity and mapping customer model.");
    CustomerEntity customerEntity = customerRepository.findById((long) 9);
    Customer customer = DozerHelper.mapAbstract(customerEntity);

    log.info("Getting subsidiary entity and mapping subsidiary model.");
    List<SubsidiaryEntity> subsidiaryEntity = null;
    subsidiaryEntity = subsidiaryRepository.findByName("ARS Grodno");
    Subsidiary subsidiary = DozerHelper.map(subsidiaryEntity,
View Full Code Here

    corporateCustomer = customerService.getCustomerById(id);
  }

  @Test
  public void updateCorporateCustomerTest() {
    Customer corporateCustomer = new CorporateCustomer();
    corporateCustomer = customerService.getCustomerById((long) 9);
    corporateCustomer.setApartment((short) 10);
    corporateCustomer.setCity("TestCorp");
    corporateCustomer.setCountry("TestCorp");
    corporateCustomer.setEmail("testCorp@email.com");
    corporateCustomer.setHouse((short) 3);
    corporateCustomer.setHousing(null);
    corporateCustomer.setName("TestCorp");
    corporateCustomer.setPassword("TESTCorp");
    corporateCustomer.setPatronymic("TestovichCorp");
    corporateCustomer.setPhone("5345399");
    corporateCustomer.setProvince("TestCorp");
    corporateCustomer.setRole(EUserRole.CUSTOMER);
    corporateCustomer.setStreet("TestCorp");
    corporateCustomer.setSurname("TestovCorp");
    corporateCustomer.setZip("223744");
    corporateCustomer = customerService.updateCustomer(corporateCustomer);
  }
View Full Code Here

  }
 
  @Test
  public void addOrderTest() {
    Car car = carServise.getCarById(new Long(1));
    Customer customer = customerService.getCustomerById(new Long(7));
    Subsidiary subsidiary = subsidiaryService.getSubsidiaryById(new Long(1));
    Order order = new Order("��������", car, customer, subsidiary);
    order.setCreationDate(new Date());
    order.setStatus(EOrderStatus.NEW);
   
View Full Code Here

    log.info(orders);
  }

  @Test
  public void getLastOrdersTest() {
    Customer customer = customerService.getCustomerById(new Long(7));
    List<Order> order = orderService.getLastOrders(customer, 1);
   
    log.info(order);
  }
View Full Code Here

  }

  @Test
  public void getOrdersByCustomerTest() {
    Customer customer = customerService.getCustomerById(new Long(7));
    List<Order> order = orderService.getOrdersByCustomer(customer, EOrderStatus.NEW, 1);
   
    log.info(order);
  }
View Full Code Here

    corporateCustomer = customerService.updateCustomer(corporateCustomer);
  }
 
  @Test
  public void updatePersonalCustomerTest() {
    Customer personalCustomer = new PersonalCustomer();
    personalCustomer = customerService.getCustomerById((long) 9);
    personalCustomer.setApartment((short) 10);
    personalCustomer.setCity("TestPers");
    personalCustomer.setCountry("TestPers");
    personalCustomer.setEmail("testPers@email.com");
    personalCustomer.setHouse((short) 1);
    personalCustomer.setHousing((short) 1);
    personalCustomer.setName("TestPers");
    personalCustomer.setPassword("TESTPers");
    personalCustomer.setPatronymic("TestovichPers");
    personalCustomer.setPhone("5345399");
    personalCustomer.setProvince("TestPers");
    personalCustomer.setRole(EUserRole.CUSTOMER);
    personalCustomer.setStreet("TestPersp");
    personalCustomer.setSurname("TestovPers");
    personalCustomer.setZip("123744");
    personalCustomer = customerService.updateCustomer(personalCustomer);
  }
View Full Code Here

TOP

Related Classes of com.expositds.ars.domain.user.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.