Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.OrderCost


        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(basis.multiply(BigDecimal.valueOf(0.5)));
    assertEquals("Grunnpris:1000,Lang garasje:500.00", orderCost
        .getComment());
    assertEquals(result.setScale(2), orderCost.getCostAmount().setScale(2));

  }
View Full Code Here


        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000)
        .add(BigDecimal.valueOf(660));
    BigDecimal result;
    result = basis.add(basis.multiply(BigDecimal.valueOf(0.5)));
    String costComment=orderCost.getComment();
    assertTrue(costComment.contains("Grunnpris:1000"));
    assertTrue(costComment.contains("Takstein:660.00"));
    assertTrue(costComment.contains("Lang garasje:830.00"));
    assertEquals(result.setScale(2), orderCost.getCostAmount().setScale(2));

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660));
    assertEquals(result.setScale(2), orderCost.getCostAmount().setScale(2));
    assertEquals("Grunnpris:1000,Takstein:660.00", orderCost.getComment());

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);

    assertEquals(basis.setScale(2), orderCost.getCostAmount().setScale(2));
    assertEquals("Grunnpris:1000", orderCost.getComment());

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1000,Takstol:660.00", orderCost.getComment());
    assertEquals(result, orderCost.getCostAmount().setScale(2));

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    result = result.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals(result, orderCost.getCostAmount().setScale(2));

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1470);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);

    assertEquals(result, orderCost.getCostAmount().setScale(2));

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1470);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1470,Takstein:660.00", orderCost.getComment());
    assertEquals(result, orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());

    allTransportCostBasis.addAll(list);

    transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    orderCost = orderCosts.iterator().next();

    assertEquals("Etterlevering:", orderCost.getComment());
    assertEquals(BigDecimal.valueOf(0), orderCost.getCostAmount());

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1000,Takstein:660.00", orderCost.getComment());
    assertEquals(result, orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    orderCost = orderCosts.iterator().next();
    assertEquals("Etterlevering:Takstol:660.00", orderCost.getComment());
    assertEquals(BigDecimal.valueOf(660).setScale(2), orderCost
        .getCostAmount().setScale(2));

  }
View Full Code Here

        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1470);
    // BigDecimal result;
    // result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1470", orderCost.getComment());
    assertEquals(basis.setScale(2), orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    orderCost = orderCosts.iterator().next();

    assertEquals(BigDecimal.valueOf(660).setScale(2), orderCost
        .getCostAmount().setScale(2));

  }
View Full Code Here

TOP

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

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.