Class ICIUtility

  • public class ICIUtility
    extends Object
    • Constructor Detail

      • ICIUtility

        public ICIUtility()
    • 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 New Order with the default Parameters for the automated Tests
      • createNewSalesOrderLineWithDefaultParameters

        public static OrderLine createNewSalesOrderLineWithDefaultParameters​(Order order)
        Creates and saves a new OrderLine with the default parameters for the automated tests
      • processOrder

        public static boolean processOrder​(Order order)
        Calls C_Order_Post method to process a Order given as a parameter
      • createNewSalesInvoiceWithDefaultParameters

        public static Invoice createNewSalesInvoiceWithDefaultParameters()
                                                                  throws Exception
        Creates and saves a new Invoice with the default parameters for the automated tests
      • createNewSalesInvoiceLineWithDefaultParameters

        public static InvoiceLine createNewSalesInvoiceLineWithDefaultParameters​(Invoice invoice)
        Creates and saves a new InvoiceLine with the default parameters for the automated tests
      • processInvoice

        public static boolean processInvoice​(Invoice invoice)
                                      throws Exception
        Calls C_Invoice_Post method to process a Invoice given as a parameter
      • reactivateInvoice

        public static boolean reactivateInvoice​(Invoice invoice)
        Calls C_Invoice_Post method to reactivate an already Processed Invoice given as a parameter
      • createNewShipmentWithDefaultParameters

        public static ShipmentInOut createNewShipmentWithDefaultParameters​(Order order)
        Creates and saves a new ShipmentInOut with the default parameters for the automated tests
      • createNewShipmentLineWithDefaultParameters

        public static ShipmentInOutLine createNewShipmentLineWithDefaultParameters​(ShipmentInOut shipment)
        Creates and saves a new ShipmentInOutLine with the default parameters for the automated tests
      • processShipment

        public static boolean processShipment​(BaseOBObject document)
        Calls M_Inout_Post method to process a ShipmentInOut given as a parameter
      • reloadAndRefreshShipment

        public static ShipmentInOut reloadAndRefreshShipment​(ShipmentInOut shipmentParameter)
        Reloads the given ShipmentInOut 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.
        t - exception.
        the underlying trigger message.