Class ReferencedInventoryBoxTest
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.base.weld.test.WeldBaseTest
-
- org.openbravo.test.referencedinventory.ReferencedInventoryTest
-
- org.openbravo.test.referencedinventory.ReferencedInventoryBoxTest
-
- Direct Known Subclasses:
ReferencedInventoryBoxForcedReservation
,ReferencedInventoryBoxFullReservationTest
,ReferencedInventoryBoxOverReservation1MovementLineTest
,ReferencedInventoryBoxOverReservation2MovementLinesTest
,ReferencedInventoryBoxPartialReservation1MovementLineTest
,ReferencedInventoryBoxPartialReservation2MovementLinesTest
,ReferencedInventoryBoxSeveralStorageDetailsTest
,ReferencedInventoryExceptionTest
,ReferencedInventoryFullBoxTest
,ReferencedInventoryPartialBoxTest
,ReferencedInventoryUnboxTest
public abstract class ReferencedInventoryBoxTest extends ReferencedInventoryTest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ReferencedInventoryBoxTest.ParamsBoxReservationTest
protected class
ReferencedInventoryBoxTest.ParamsBoxTest
-
Field Summary
-
Fields inherited from class org.openbravo.test.referencedinventory.ReferencedInventoryTest
BINS, ISALLOCATED, log, PRODUCTS, RECEIVEDQTY_10
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_INVOICE_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description ReferencedInventoryBoxTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ReferencedInventory
testBox(String toBinId, String productId, String attributeSetInstanceId, BigDecimal qtyInBox, BigDecimal reservationQty, boolean isAllocated)
Runs a box process and verifies it.protected ReferencedInventory
testBox(String _toBinId, String productId, String attributeSetInstanceId, BigDecimal _qtyInBox, BigDecimal reservationQty, boolean isAllocated, boolean isForceBin, boolean isForceAttribute)
-
Methods inherited from class org.openbravo.test.referencedinventory.ReferencedInventoryTest
clearSession, initialize
-
Methods inherited from class org.openbravo.base.weld.test.WeldBaseTest
createTestArchive, getWeldComponent, resetOBInterceptors, setUp
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
Methods inherited from class org.openbravo.test.base.MockableBaseTest
mockStatic
-
-
-
-
Method Detail
-
testBox
protected ReferencedInventory testBox(String toBinId, String productId, String attributeSetInstanceId, BigDecimal qtyInBox, BigDecimal reservationQty, boolean isAllocated) throws Exception
Runs a box process and verifies it. If reservationQty is not null, it first create a reservation for reservationQty and then boxes the qtyInBox units- Parameters:
toBinId
- new bin where the referenced inventory is left. If null it is the same as the current storage detailproductId
- Mandatory. A new product will be created as a clone of this oneattributeSetInstanceId
- Mandatory only when the product does require it.qtyInBox
- quantity of the storage detail to be included in the reference inventory. Note that there is maximum availability of 10 units of the cloned product, so this quantity should be lower or equal than 10reservationQty
- quantity to create a reservation before running the boxing. If null, no reservation will be createdisAllocated
- creates allocated or non-allocated reservation. Only useful if reservationQty is not null- Returns:
- the created referenced inventory
- Throws:
Exception
-
testBox
protected ReferencedInventory testBox(String _toBinId, String productId, String attributeSetInstanceId, BigDecimal _qtyInBox, BigDecimal reservationQty, boolean isAllocated, boolean isForceBin, boolean isForceAttribute) throws Exception
- Throws:
Exception
-
-