Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


  @Test
  public void skalLageVismaFilForOrdreUtenLeveringsdatoOgUtenTransportAarOGUke()
      throws IOException, ParseException {
    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    Order ordre = new Order();
    Transport transport = new Transport();
    ordre.setTransport(transport);
    OrdchgrHeadV head = new OrdchgrHeadV();
    head.setOrdNo(1);
    String fileName = vismaFileCreator.createTransportFile(ordre, head,
        "visma");
    assertNotNull(fileName);
View Full Code Here


  @Test
  public void skalLageVismaFilForLeveringsdato() throws IOException,
      ParseException {
    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    Order ordre = new Order();
    Transport transport = new Transport();
    transport.setLoadingDate(Util.DATE_FORMAT_YYYYMMDD.parse("20110929"));
    ordre.setTransport(transport);
    OrdchgrHeadV head = new OrdchgrHeadV();
    head.setOrdNo(1);
    String fileName = vismaFileCreator.createTransportFile(ordre, head,
        "visma");
    assertNotNull(fileName);
View Full Code Here

    ArticleType articleType=new ArticleType();
    articleType.setArticleTypeName("Kledning");
    Ordln ordln=new Ordln();
    ordln.setOrdlnPK(new OrdlnPK(1, 1));
    ordln.setFree4(BigDecimal.valueOf(2));
    Order order=new Order();
    OrderLine gavl=new OrderLine();
    gavl.setArticlePath("Gavl");
    OrderLine kledning = new OrderLine();
    kledning.setArticlePath("Gavl$Kledning");
    gavl.addOrderLine(kledning);
    order.addOrderLine(gavl);
    kledning = gavl.getOrderLines().iterator().next();
    assertNotNull(kledning);
    assertEquals("Gavl$Kledning", kledning.getArticlePath());
    assertNotNull(kledning.getOrderLineRef());
  }
View Full Code Here

    ArticleType articleType=new ArticleType();
    articleType.setArticleTypeName("Kledning");
    Ordln ordln=new Ordln();
    ordln.setOrdlnPK(new OrdlnPK(1, 1));
    ordln.setFree4(BigDecimal.ONE);
    Order order=new Order();
    OrderLine vegg=new OrderLine();
    vegg.setArticlePath("Vegg");
    OrderLine kledning = new OrderLine();
    kledning.setArticlePath("Vegg$Kledning");
    vegg.addOrderLine(kledning);
    order.addOrderLine(vegg);
    kledning = vegg.getOrderLines().iterator().next();
    assertNotNull(kledning);
    assertEquals("Vegg$Kledning", kledning.getArticlePath());
    assertNotNull(kledning.getOrderLineRef());
  }
View Full Code Here

    ArticleType articleType=new ArticleType();
    articleType.setArticleTypeName("Kledning");
    Ordln ordln=new Ordln();
    ordln.setOrdlnPK(new OrdlnPK(1, 1));
    ordln.setFree4(BigDecimal.ZERO);
    Order order=new Order();
    OrderLine vegg=new OrderLine();
    vegg.setArticlePath("Vegg");
    order.addOrderLine(vegg);
    Ord ord=null;
    OrderLine kledning =kledningConverter.convert(articleType, ordln, order, ord);
    assertNotNull(kledning);
    assertEquals("Kledning", kledning.getArticlePath());
    assertNull(kledning.getOrderLineRef());
View Full Code Here

    when(managerRepository.getOrdlnManager()).thenReturn(ordlnManager);
    ColliManager colliManager=(ColliManager)ModelUtil.getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    TransportLetter transportLetter = new GarageTransportLetter(
        managerRepository);
    final Order transportable = new Order();
    ConstructionType constructionType = new ConstructionType();
    transportable.setConstructionType(constructionType);
    OrderLine orderLine = new OrderLine();
    transportable.addOrderLine(orderLine);
    final Colli colli = new Colli();
    colli.setColliName("test");
    colli.addOrderLine(orderLine);
    transportable.addColli(colli);
    Customer customer = new Customer();
    transportable.setCustomer(customer);
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    transportable.setProductArea(productArea);

//    context.checking(new Expectations() {
//      {
//        allowing(managerRepository).getOrderManager();
//        allowing(managerRepository).getOrdlnManager();
View Full Code Here

  }

  @Test
  public void skalSettProductionBasis() throws ProTransException {
    Order order = orderManager.findByOrderNr("51693");
    order.setProductionBasis(Integer.valueOf(50));
    orderManager.saveOrder(order);
    order = orderManager.findByOrderNr("51693");
    assertNotNull(order.getProductionBasis());
    order.setProductionBasis(null);
    orderManager.saveOrder(order);
  }
View Full Code Here

    orderManager.saveOrder(order);
  }

  @Test
  public void insertOrder() throws Exception {
    Order order = new Order();
    orders.add(order);
    Customer customer = new Customer();
    customers.add(customer);
    customer.setCustomerNr(100);
    customer.setFirstName("Atle");
    customer.setLastName("Brekka");
    customerManager.saveCustomer(customer);

    productArea = new ProductArea(null, "test", null, null, null, null,
        null);
    productAreaManager.saveProductArea(productArea);

    ConstructionType constructionType = new ConstructionType();
    constructionTypes.add(constructionType);
    constructionType.setName("Q5");
    constructionType.setProductArea(productArea);
    constructionTypeManager.saveConstructionType(constructionType);

    order.setOrderNr("test");
    order.setCustomer(customer);
    order.setConstructionType(constructionType);
    order.setDeliveryAddress("testing");
    order.setPostalCode("0354");
    order.setPostOffice("Oslo");
    order.setOrderDate(Calendar.getInstance().getTime());
    order.setProductArea(productArea);

    ArticleType articleType = new ArticleType(null, "test", null, null,
        null, null, null, null, null, null, null, null);
    articleTypes.add(articleType);
    articleTypeManager.saveArticleType(articleType);
    OrderLine orderLine = new OrderLine(null, order, null, articleType,
        null, null, null, null, null, null, "test", null, null, null,
        null, null, null, null, null, null, null, null);
    Set<OrderLine> orderLines = new HashSet<OrderLine>();
    orderLines.add(orderLine);

    order.setOrderLines(orderLines);

    orderManager.saveOrder(order);
    order = orderManager.findByOrderNr("1");
    assertNotNull(order);
    assertEquals("1", order.getOrderNr());
    assertNotNull(order.getOrderId());
  }
View Full Code Here


  @Test
  public void testShowReport() throws Exception {

    Order order = orderManager.findByOrderNr("43860");
    assertNotNull(order);
    orderManager.lazyLoadOrder(order,
        new LazyLoadOrderEnum[] { LazyLoadOrderEnum.ORDER_COSTS });
    List<Ordln> vismaOrderLines = ordlnManager.findByOrderNr(order
        .getOrderNr());
    assertNotNull(vismaOrderLines);
    assertEquals(3, vismaOrderLines.size());
    CraningCostManager craningCostManager = (CraningCostManager) ModelUtil
        .getBean(CraningCostManager.MANAGER_NAME);
View Full Code Here

  @Test
  // (groups = { "maven" })
  public final void importCosts() throws Exception {
    List<Order> orders = incomingOrderManager.findByOrderNr("11");
    assertEquals(1, orders.size());
    Order order = orders.get(0);
    incomingOrderManager.setCosts(order);

    assertEquals(true, order.doAssembly());
    assertNotNull(order);

    Set<OrderCost> costs = order.getOrderCosts();
    assertNotNull(costs);
   
    boolean egenproduksjonKunde = false;
    boolean egenproduksjonIntern = false;
    boolean frakt = false;
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Order

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.