Class ICIUtility
- java.lang.Object
-
- org.openbravo.test.materialMgmt.iscompletelyinvoicedshipment.ICIUtility
-
public class ICIUtility extends Object
-
-
Constructor Summary
Constructors Constructor Description ICIUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InvoiceLine
createNewInvoiceLine(ICIInvoiceLineParameters parameters)
Creates and saves a newInvoiceLine
with the default parameters for the automated testsstatic OrderLine
createNewOrderLine(ICIOrderLineParameters parameters)
Creates and saves a newOrderLine
with the default parameters for the automated testsstatic InvoiceLine
createNewSalesInvoiceLineWithDefaultParameters(Invoice invoice)
Creates and saves a newInvoiceLine
with the default parameters for the automated testsstatic Invoice
createNewSalesInvoiceWithDefaultParameters()
Creates and saves a newInvoice
with the default parameters for the automated testsstatic OrderLine
createNewSalesOrderLineWithDefaultParameters(Order order)
Creates and saves a newOrderLine
with the default parameters for the automated testsstatic Order
createNewSalesOrderWithDefaultParameters()
Creates and saves a NewOrder
with the default Parameters for the automated Testsstatic ShipmentInOutLine
createNewShipmentLineWithDefaultParameters(ShipmentInOut shipment)
Creates and saves a newShipmentInOutLine
with the default parameters for the automated testsstatic ShipmentInOut
createNewShipmentWithDefaultParameters(Order order)
Creates and saves a newShipmentInOut
with the default parameters for the automated testsstatic ShipmentInOutLine
createShipmentLine(ICIShipmentLineParameters parameters)
Creates and saves a newShipmentInOutLine
with the default parameters for the automated testsstatic String
getExceptionMessage(Throwable t)
Returns the cause of a trigger exception (BatchupdateException).static boolean
processInvoice(Invoice invoice)
Calls C_Invoice_Post method to process aInvoice
given as a parameterstatic boolean
processOrder(Order order)
Calls C_Order_Post method to process aOrder
given as a parameterstatic boolean
processShipment(BaseOBObject document)
Calls M_Inout_Post method to process aShipmentInOut
given as a parameterstatic boolean
reactivateInvoice(Invoice invoice)
Calls C_Invoice_Post method to reactivate an already ProcessedInvoice
given as a parameterstatic ShipmentInOut
reloadAndRefreshShipment(ShipmentInOut shipmentParameter)
Reloads the givenShipmentInOut
object and then refreshes it from the Database to retrieve it's actual value into the existing Hibernate sessionstatic void
setTestContextSpain()
Set the default context for the Automated Tests with: User: Openbravo Role: F&B International Group Administrator Client: F&B International Group Organization: F&B España
-
-
-
Method Detail
-
setTestContextSpain
public static void setTestContextSpain()
Set the default context for the Automated Tests with:- User: Openbravo
- Role: F&B International Group Administrator
- Client: F&B International Group
- Organization: F&B España
-
createNewSalesOrderWithDefaultParameters
public static Order createNewSalesOrderWithDefaultParameters()
Creates and saves a NewOrder
with the default Parameters for the automated Tests
-
createNewSalesOrderLineWithDefaultParameters
public static OrderLine createNewSalesOrderLineWithDefaultParameters(Order order)
Creates and saves a newOrderLine
with the default parameters for the automated tests
-
createNewOrderLine
public static OrderLine createNewOrderLine(ICIOrderLineParameters parameters)
Creates and saves a newOrderLine
with the default parameters for the automated tests
-
processOrder
public static boolean processOrder(Order order)
Calls C_Order_Post method to process aOrder
given as a parameter
-
createNewSalesInvoiceWithDefaultParameters
public static Invoice createNewSalesInvoiceWithDefaultParameters() throws Exception
Creates and saves a newInvoice
with the default parameters for the automated tests- Throws:
Exception
-
createNewSalesInvoiceLineWithDefaultParameters
public static InvoiceLine createNewSalesInvoiceLineWithDefaultParameters(Invoice invoice)
Creates and saves a newInvoiceLine
with the default parameters for the automated tests
-
createNewInvoiceLine
public static InvoiceLine createNewInvoiceLine(ICIInvoiceLineParameters parameters)
Creates and saves a newInvoiceLine
with the default parameters for the automated tests
-
processInvoice
public static boolean processInvoice(Invoice invoice) throws Exception
Calls C_Invoice_Post method to process aInvoice
given as a parameter- Throws:
Exception
-
reactivateInvoice
public static boolean reactivateInvoice(Invoice invoice)
Calls C_Invoice_Post method to reactivate an already ProcessedInvoice
given as a parameter
-
createNewShipmentWithDefaultParameters
public static ShipmentInOut createNewShipmentWithDefaultParameters(Order order)
Creates and saves a newShipmentInOut
with the default parameters for the automated tests
-
createNewShipmentLineWithDefaultParameters
public static ShipmentInOutLine createNewShipmentLineWithDefaultParameters(ShipmentInOut shipment)
Creates and saves a newShipmentInOutLine
with the default parameters for the automated tests
-
createShipmentLine
public static ShipmentInOutLine createShipmentLine(ICIShipmentLineParameters parameters)
Creates and saves a newShipmentInOutLine
with the default parameters for the automated tests
-
processShipment
public static boolean processShipment(BaseOBObject document)
Calls M_Inout_Post method to process aShipmentInOut
given as a parameter
-
reloadAndRefreshShipment
public static ShipmentInOut reloadAndRefreshShipment(ShipmentInOut shipmentParameter)
Reloads the givenShipmentInOut
object and then refreshes it from the Database to retrieve it's actual value into the existing Hibernate session
-
getExceptionMessage
public static String getExceptionMessage(Throwable t)
Returns the cause of a trigger exception (BatchupdateException). Hibernate and JDBC will wrap the exception thrown by the trigger in another exception (the java.sql.BatchUpdateException) and this exception is sometimes wrapped again. Also the java.sql.BatchUpdateException stores the underlying trigger exception in the nextException and not in the cause property.- Parameters:
t
- exception.- Returns:
- the underlying trigger message.
-
-