Related to bu 29891: Adjust costing tests to the new behavior
authorUnai Martirena <unai.martirena@openbravo.com>
Thu, 14 May 2015 17:12:18 +0200
changeset 26695 aafe4f86b29c
parent 26694 eb03fd0d3bd2
child 26696 a2dd91b010a9
Related to bu 29891: Adjust costing tests to the new behavior
src-test/src/org/openbravo/test/costing/TestCosting.java
--- a/src-test/src/org/openbravo/test/costing/TestCosting.java	Thu May 14 17:11:31 2015 +0200
+++ b/src-test/src/org/openbravo/test/costing/TestCosting.java	Thu May 14 17:12:18 2015 +0200
@@ -1165,9 +1165,9 @@
       List<MaterialTransaction> transactionList = getProductTransactions(product.getId());
       List<ProductCostingAssert> productCostingAssertList = new ArrayList<ProductCostingAssert>();
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(0), price1, price3,
-          price1, quantity1.add(quantity1)));
+          price1, quantity1));
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(4), price2, price2,
-          price2, quantity1));
+          price2, quantity1.subtract(quantity2)));
       assertProductCosting(product.getId(), productCostingAssertList);
 
       // Assert cost adjustment
@@ -1385,7 +1385,7 @@
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(0), price3, price1,
           price3, quantity1));
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(2), price2, price4,
-          price2, quantity1.add(quantity2.negate())));
+          price2, quantity1));
       assertProductCosting(product.getId(), productCostingAssertList);
 
       // Assert cost adjustment
@@ -2341,7 +2341,7 @@
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(0), price1, null,
           price1, quantity1));
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(3), price1, null,
-          price1, quantity3));
+          price1, quantity3.subtract(quantity1)));
       assertProductCosting(product.getId(), productCostingAssertList);
 
       // Assert cost adjustment
@@ -2429,7 +2429,7 @@
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(0), price1, null,
           price1, quantity1));
       productCostingAssertList.add(new ProductCostingAssert(transactionList.get(3), price2, price3,
-          price2, quantity3));
+          price2, quantity3.subtract(quantity1)));
       assertProductCosting(product.getId(), productCostingAssertList);
 
       // Assert cost adjustment