diff --git a/org.adempiere.extend/FunctionalTestSuite.launch b/org.adempiere.extend/FunctionalTestSuite.launch
deleted file mode 100644
index 06f2ca48a3..0000000000
--- a/org.adempiere.extend/FunctionalTestSuite.launch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/org.adempiere.extend/InventoryTest.launch b/org.adempiere.extend/InventoryTest.launch
deleted file mode 100644
index b0a6ca644a..0000000000
--- a/org.adempiere.extend/InventoryTest.launch
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/org.adempiere.extend/Profile-SingleMProductTest.launch b/org.adempiere.extend/Profile-SingleMProductTest.launch
deleted file mode 100644
index cf6e2f7b91..0000000000
--- a/org.adempiere.extend/Profile-SingleMProductTest.launch
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/org.adempiere.extend/RUN_build.bat b/org.adempiere.extend/RUN_build.bat
deleted file mode 100644
index e229894a29..0000000000
--- a/org.adempiere.extend/RUN_build.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@Title Build Extend
-@Rem $Header: /cvsroot/adempiere/extend/RUN_build.bat,v 1.9 2005/09/16 00:49:02 jjanke Exp $
-
-@CALL ..\utils_dev\myDevEnv.bat
-@IF NOT %ADEMPIERE_ENV%==Y GOTO NOBUILD
-
-@echo Cleanup ...
-@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main clean
-
-@echo Building ...
-@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main dist
-
-@Echo Done ...
-@sleep 60
-@exit
-
-:NOBUILD
-@Echo Check myDevEnv.bat (copy from myDevEnvTemplate.bat)
-@Pause
diff --git a/org.adempiere.extend/RUN_build.sh b/org.adempiere.extend/RUN_build.sh
deleted file mode 100644
index a39d2ae684..0000000000
--- a/org.adempiere.extend/RUN_build.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-# Module compiling script
-# Ported from Windows script Marek Mosiewicz
-
-
-SAVED_DIR=`pwd` #save current dir
-cd `dirname $0`/../utils_dev #change dir to place where script resides - doesn not work with sym links
-UTILS_DEV=`pwd` #this is ADempiere source
-cd $SAVED_DIR #back to the saved directory
-
-. $UTILS_DEV/myDevEnv.sh #call environment
-echo done
-if [ ! $ADEMPIERE_ENV==Y ] ; then
- echo "Can't set development environment - check myDevEnv.sh"
- exit 1
-fi
-
-echo running Ant
-$JAVA_HOME/bin/java -Dant.home="." $ANT_PROPERTIES org.apache.tools.ant.Main
diff --git a/org.adempiere.extend/database/XX_View.sql b/org.adempiere.extend/database/XX_View.sql
deleted file mode 100644
index b62563f71a..0000000000
--- a/org.adempiere.extend/database/XX_View.sql
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Example View DDL SQL
- *
- * @author Jorg Janke
- * @version $Id: XX_View.sql,v 1.1 2006/04/21 17:55:19 jjanke Exp $
- */
-
--- Inspect data
-SELECT C_Invoice_ID,
- AD_Client_ID,AD_Org_ID, IsActive, Created,CreatedBy, Updated,UpdatedBy,
- IsSOTrx, DocumentNo, DocStatus, DocAction, Processed,
- SalesRep_ID, DateInvoiced, DatePrinted, DateAcct,
- C_BPartner_ID, C_BPartner_Location_ID, AD_User_ID,
- C_Currency_ID,
- TotalLines, GrandTotal,
- Multiplier, MultiplierAP, DocBaseType
-FROM C_Invoice_V
-/
-
--- The view
-CREATE OR REPLACE VIEW XX_BPartner_Total
-AS
-SELECT AD_Client_ID,AD_Org_ID,
- 'Y' AS IsActive, SysDate AS Created, 0 AS CreatedBy, SysDate AS Updated, 0 AS UpdatedBy,
- C_BPartner_ID, C_BPartner_Location_ID, AD_User_ID,
- C_Currency_ID,
- SUM(InvoiceOpen (C_Invoice_ID, 0) * MultiplierAP) AS OpenAmount
-FROM C_Invoice_V
-WHERE Processed='Y'
- AND IsPaid='N'
-GROUP BY AD_Client_ID,AD_Org_ID,
- C_BPartner_ID, C_BPartner_Location_ID, AD_User_ID,
- C_Currency_ID
-/
diff --git a/org.adempiere.extend/database/XX_Visit.sql b/org.adempiere.extend/database/XX_Visit.sql
deleted file mode 100644
index 50473f3e7e..0000000000
--- a/org.adempiere.extend/database/XX_Visit.sql
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Example Table DDL SQL
- *
- * @author Jorg Janke
- * @version $Id: XX_Visit.sql,v 1.1 2006/04/21 17:55:19 jjanke Exp $
- */
-CREATE TABLE XX_Visit(
- XX_Visit_ID NUMBER(10, 0) NOT NULL,
- AD_Client_ID NUMBER(10, 0) NOT NULL,
- AD_Org_ID NUMBER(10, 0) NOT NULL,
- IsActive CHAR(1) DEFAULT 'Y' NOT NULL
- CHECK (IsActive in ('Y','N')),
- Created DATE DEFAULT SYSDATE NOT NULL,
- CreatedBy NUMBER(10, 0) NOT NULL,
- Updated DATE DEFAULT SYSDATE NOT NULL,
- UpdatedBy NUMBER(10, 0) NOT NULL,
- Name NVARCHAR2(60) NOT NULL,
- Description NVARCHAR2(255),
- VisitTime DATE NOT NULL,
- Minutes NUMBER(10, 0) NOT NULL,
- C_BPartner_ID NUMBER(10, 0) NOT NULL,
- C_BPartner_Location_ID NUMBER(10, 0) NOT NULL,
- AD_User_ID NUMBER(10, 0) NOT NULL,
- SalesRep_ID NUMBER(10, 0) NOT NULL,
- R_InterestArea_ID NUMBER(10, 0) NOT NULL,
- Processed CHAR(1),
- Processing CHAR(1),
- CONSTRAINT XX_Visit_Key PRIMARY KEY (XX_Visit_ID),
- CONSTRAINT CBPLoction_XXVisit FOREIGN KEY (C_BPartner_Location_ID)
- REFERENCES C_BPartner_Location(C_BPartner_Location_ID),
- CONSTRAINT ADUser_XXVisit FOREIGN KEY (AD_User_ID)
- REFERENCES AD_User(AD_User_ID),
- CONSTRAINT RInterestArea_XXVisit FOREIGN KEY (R_InterestArea_ID)
- REFERENCES R_InterestArea(R_InterestArea_ID),
- CONSTRAINT ADUserSalesRep_XXVisit FOREIGN KEY (SalesRep_ID)
- REFERENCES AD_User(AD_User_ID),
- CONSTRAINT CBPartner_XXVisit FOREIGN KEY (C_BPartner_ID)
- REFERENCES C_BPartner(C_BPartner_ID)
-)
-/
-
-
-
diff --git a/org.adempiere.extend/documentation.bat b/org.adempiere.extend/documentation.bat
deleted file mode 100644
index 659c934f80..0000000000
--- a/org.adempiere.extend/documentation.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@Rem API Documentation for Base
-
-call ..\doc\documentation.bat src doc -private
-
-@pause
\ No newline at end of file
diff --git a/org.adempiere.extend/src/test/functional/AlertTest.java b/org.adempiere.extend/src/test/functional/AlertTest.java
deleted file mode 100644
index ab31a48044..0000000000
--- a/org.adempiere.extend/src/test/functional/AlertTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**********************************************************************
-* This file is part of Adempiere ERP Bazaar *
-* http://www.adempiere.org *
-* *
-* Copyright (C) Trifon Trifonov. *
-* Copyright (C) Contributors *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; either version 2 *
-* of the License, or (at your option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* You should have received a copy of the GNU General Public License *
-* along with this program; if not, write to the Free Software *
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
-* MA 02110-1301, USA. *
-* *
-* Contributors: *
-* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
-* *
-* Sponsors: *
-* - Company (http://www.d3-soft.com) *
-***********************************************************************/
-package test.functional;
-
-import java.util.logging.Level;
-
-import org.compiere.model.MAlert;
-import org.compiere.model.MAlertProcessor;
-import org.compiere.model.MAlertProcessorLog;
-import org.compiere.model.X_AD_AlertProcessor;
-import org.compiere.util.CLogger;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-
-/**
- * Example Test which shows usage of new methods.
- *
- * @author Trifon Trifonov
- * @version $Id$
- */
-public class AlertTest extends AdempiereTestCase
-{
-
- /** Logger */
- private static final CLogger log = CLogger.getCLogger (AlertTest.class);
-
- /**
- * Run
- */
- public void testAlertCreation() throws Exception
- {
- if (log.isLoggable(Level.INFO)) log.info("trx = " + getTrxName());
- boolean resultSave = false;
-
- //----- Old way:
- MAlert alertOldWay = new MAlert(Env.getCtx(), 100, getTrxName());
- if (log.isLoggable(Level.INFO)) log.info(alertOldWay.toString());
-
- X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), getTrxName());
- if (log.isLoggable(Level.INFO)) log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID());
-
- alertOldWay.setDescription("Trifon test");
- //--- Save;
- resultSave = alertOldWay.save();
- if (log.isLoggable(Level.INFO)) log.info("resultSave = " + resultSave);
-
- System.out.println("New value of Description = " + alertOldWay.getDescription());
-
- //----- New way:
-/* I_AD_Alert alert = new MAlert(Env.getCtx(), 100, trx.getTrxName());
- log.info(alert.toString());
-
- I_AD_AlertProcessor alertProcessor = alert.getI_AD_AlertProcessor();
- log.info("I_AD_AlertProcessor.getAD_AlertProcessor_ID = " + alertProcessor.getAD_AlertProcessor_ID());
-
- log.info("alert.getAD_AlertProcessor_ID = " + alert.getAD_AlertProcessor_ID());
-
- alert.setDescription("Trifon Description modified!");
- //--- Save; PO.save(PO) must be static method!!! Two way of usage: PO.save(Object) or PO.save(PO)
- //resultSave = PO.save((PO)alert);
- resultSave = PO.save(alert); // Overloaded save method; For simple usage!
- log.info("resultSave = " + resultSave);
-
- System.out.println("New value of Description = " + alert.getDescription());
-*/
-
- commit();
- }
- public void testAlertProcessor() {
- MAlertProcessor alertpro = new MAlertProcessor(getCtx(), 100,null);
- alertpro.setAD_AlertProcessor_ID(100);
- MAlertProcessorLog[] test = (MAlertProcessorLog[]) alertpro.getLogs();
- assertTrue("Alert Processor has logs", test.length > 0);
- MAlert[] alerts = (MAlert[])alertpro.getAlerts(true);
- assertTrue("There are alerts", alerts.length> 0);
- assertTrue ("There are active recs", MAlertProcessor.getActive(getCtx()).length > 0);
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MAssetTest.java b/org.adempiere.extend/src/test/functional/MAssetTest.java
deleted file mode 100644
index 23d4c57297..0000000000
--- a/org.adempiere.extend/src/test/functional/MAssetTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MAsset;
-import org.compiere.model.MAssetDelivery;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MAssetTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- { //test with mock A_Asset and A_Asset_Delivery record
- MAsset asset = new MAsset(getCtx(), 1000000, getTrxName());
- MAssetDelivery[] assets = asset.getDeliveries();
- assertTrue("assets must have values", assets.length > 0);
- MAsset getstmt = MAsset.getFromShipment(getCtx(), 1000000, getTrxName());
- assertTrue("stmt must be active", getstmt.isActive() == true);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MAttributeTest.java b/org.adempiere.extend/src/test/functional/MAttributeTest.java
deleted file mode 100644
index f00d27e248..0000000000
--- a/org.adempiere.extend/src/test/functional/MAttributeTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MAttribute;
-import org.compiere.model.MAttributeInstance;
-import org.compiere.model.MAttributeValue;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MAttributeTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MAttribute attrib = new MAttribute(getCtx(), 100, getTrxName());
- MAttribute[] attbClient = MAttribute.getOfClient(getCtx(), true, true);
- assertTrue("atrributes must be true", attbClient.length > 0);
- MAttributeValue[] av = attrib.getMAttributeValues();
- assertTrue("atrributes must have values", av.length > 0);
- MAttributeInstance ai = attrib.getMAttributeInstance(100);
- assertTrue("atrributes must have values", ai.isActive());
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MBPartnerTest.java b/org.adempiere.extend/src/test/functional/MBPartnerTest.java
deleted file mode 100644
index b07f5f48ca..0000000000
--- a/org.adempiere.extend/src/test/functional/MBPartnerTest.java
+++ /dev/null
@@ -1,550 +0,0 @@
-//MBPartnerTest.java
-package test.functional;
-
-import org.compiere.model.MBPartner;
-
-import test.AdempiereTestCase;
-
-public class MBPartnerTest extends AdempiereTestCase {
-
- // Variables needed for importing/migrating business partners
- //private MLocation location = null;
-
- //private MBPartner m_partner = null; //business partner
- /*
- private MBPartnerLocation bpl = null; //business partner location
- private MUser user = null; //business contact
- private MContactInterest ci = null; //contact interest area
-
- // Variables needed for importing/migrating accounts
- private MElementValue ev = null; //element value
- private MAcctSchema as = null; //account schema
- private MAccount acct = null; //account
-
- // Variables needed for importing/migrating bank statements
- private MBankStatement statement = null;
- private MBankAccount account = null;
- private MBankStatementLine line = null;
-
- // Variables needed for importing/migrating conversion rates
- private MConversionRate rate = null;
-
- // Variables needed for importing/migrating General Ledger Journal
- private MJournalBatch batch = null;
- private MJournal journal = null;
- private MJournalLine line = null;
-
- // Variables needed for importing/migrating Inventory
- private MInventory inventory = null;
- private MProduct product = null;
- private MAttributeSet mas = null;
- private MAttributeSetInstance masi = null;
- private MInventoryLine line = null;
-
- // Variables needed for importing/migrating Invoices
- private MInvoice invoice = null;
- private MInvoiceLine line = null;
-
- // Variables needed for importing/migrating orders
- private MOrder order = null;
- private MOrderLine line = null;
-
- // Variables needed for importing/migrating payments
- private MPayment payment = null;
-
- // Variables needed for importing/migrating products
- private MProduct product = null;
- private MProductPrice pp = null;
-
- // Variables needed for mrp
-
- private MCost cost = null;
- private MCostElement costElement = null;
- private MForecastLine forcastLine = null;
- private MOrder order = null;
- private MOrderLine line = null;
- private MPPCostCollector costCollector = null;
- private MPPOrderBOM orderBOM = null;
- private MPPOrderBOMLine = null;
- private MPPOrderBOMLineMA = null;
- private MPPOrderCost = null;
- private MPPOrder = null;
- private MPPProductBOM = null;
- private MPPProductBOMLine = null;
- private MPPProductCosting = null;
- private MPPProductPlanning = null;
- private MPPProfileBOMCost = null;
- private MPPProfileBOM = null;
- private MPPProfileBOMProduct = null;
- private MPPProfileBOMReal = null;
- private MPPProfileBOMSelected = null;
- private MQMSpecification = null;
- private MQMSpecificationLine = null;
- private MRequisition = null;
- private MRequisitionLine = null;
-
-
- // other variables that may be needed:
-
- private MAdvertisement = null;
- private MAging = null;
- private MAlert = null;
- private MAlertRecipient = null;
- private MAlertRule = null;
-
- private MAllocationHdr = null;
- private MAllocationLine = null;
-
- private MAssetDelivery = null;
- private MAssetGroup = null;
- private MAsset = null;
- private MAssignmentSlot = null;
- private MAttributeInstance = null;
-
- private MAccessProfile = null;
- private MMailText = null;
- private MAcctProcessor = null;
- private MMatchInv = null;
- private MAcctProcessorLog = null;
- private MMatchPO = null;
- private MAchievement = null;
- private MMeasureCalc = null;
- private MActivity = null;
- private MMeasure = null;
- private MAd = null;
- private MMediaDeploy = null;
- private MAdvertisement = null;
- private MMedia = null;
- private MAging = null;
- private MMediaServer = null;
- private MAlert = null;
- private MMovementConfirm = null;
- private MAlertProcessor = null;
- private MMovement = null;
- private MAlertProcessorLog = null;
- private MMovementLineConfirm = null;
- private MAlertRecipient = null;
- private MMovementLine = null;
- private MAlertRule = null;
- private MMovementLineMA = null;
- private MAllocationHdr = null;
- private MNewsChannel = null;
- private MAllocationLine = null;
- private MNewsItem = null;
- private MAssetDelivery = null;
- private MOrder = null;
- private MAssetGroup = null;
- private MOrderLine = null;
- private MAsset = null;
- private MOrderTax = null;
- private MAssignmentSlot = null;
- private MPackage = null;
- private MAttributeInstance = null;
- private MPackageLine = null;
- private MAttribute = null;
- private MPaymentAllocate = null;
- private MAttributeSetInstance = null;
- private MPaymentBatch = null;
- private MAttributeSet = null;
- private MPayment = null;
- private MAttributeUse = null;
- private MPaymentProcessor = null;
- private MAttributeValue = null;
- private MPaymentTerm = null;
- private MBankAccount = null;
- private MPaymentValidate = null;
- private MBank = null;
- private MPaySchedule = null;
- private MBankStatement = null;
- private MPaySelectionCheck = null;
- private MBankStatementLine = null;
- private MPaySelection = null;
- private MBankStatementLoader = null;
- private MPaySelectionLine = null;
- private MBankStatementMatcher = null;
- private MPeriodControl = null;
- private MBOM = null;
- private MPeriod = null;
- private MBOMProduct = null;
- private MPOS = null;
- private MBPartnerInfo = null;
- private MPOSKey = null;
- private MPOSKeyLayout = null;
- private MPreference = null;
- private MBPBankAccount = null;
- private MPriceList = null;
- private MBPGroup = null;
- private MPriceListVersion = null;
- private MCalendar = null;
- private MProductBOM = null;
- private MCampaign = null;
- private MProductCategoryAcct = null;
- private MCashBook = null;
- private MProductCategory = null;
- private MCash = null;
- private MProductCosting = null;
- private MCashLine = null;
- private MProductDownload = null;
- private MChangeNotice = null;
- private MProduct = null;
- private MChangeRequest = null;
- private MProductPO = null;
- private MCharge = null;
- private MProductPrice = null;
- private MChatEntry = null;
- private MProductPricing = null;
- private MChat = null;
- private MProjectIssue = null;
- private MChatType = null;
- private MProject = null;
- private MClickCount = null;
- private MProjectLine = null;
- private MClick = null;
- private MProjectPhase = null;
- private MColor = null;
- private MProjectTask = null;
- private MColorSchema = null;
- private MProjectType = null;
- private MCommissionAmt = null;
- private MProjectTypePhase = null;
- private MCommissionDetail = null;
- private MProjectTypeTask = null;
- private MCommission = null;
- private MRecurring = null;
- private MCommissionLine = null;
- private MRecurringRun = null;
- private MCommissionRun = null;
- private MRefTable = null;
- private MContactInterest = null;
- private MRegistrationAttribute = null;
- private MContainerElement = null;
- private MRegistration = null;
- private MContainer = null;
- private MRegistrationValue = null;
- private MCostDetail = null;
- private MReplication = null;
- private MCost = null;
- private MReplicationLog = null;
- private MCostQueue = null;
- private MReplicationRun = null;
- private MCounterCount = null;
- private MRequestAction = null;
- private MCStageElement = null;
- private MRequestCategory = null;
- private MCStage = null;
- private MRequest = null;
- private MDesktop = null;
- private MRequestProcessor = null;
- private MDiscountSchemaBreak = null;
- private MRequestProcessorLog = null;
- private MDiscountSchema = null;
- private MRequestProcessorRoute = null;
- private MDiscountSchemaLine = null;
- private MRequestType = null;
- private MDistribution = null;
- private MRequestUpdate = null;
- private MDistributionLine = null;
- private MRequisition = null;
- private MDistributionList = null;
- private MRequisitionLine = null;
- private MDistributionListLine = null;
- private MResolution = null;
- private MDistributionRunDetail = null;
- private MResourceAssignment = null;
- private MDistributionRun = null;
- private MResource = null;
- private MDistributionRunLine = null;
- private MResourceType = null;
- private MDocTypeCounter = null;
- private MResourceUnAvailable = null;
- private MDunning = null;
- private MRevenueRecognition = null;
- private MDunningLevel = null;
- private MRevenueRecognitionPlan = null;
- private MDunningRunEntry = null;
- private MRfQ = null;
- private MDunningRun = null;
- private MRfQLine = null;
- private MDunningRunLine = null;
- private MRfQLineQty = null;
- private Measure = null;
- private MRfQResponse = null;
- private MEntityType = null;
- private MRfQResponseLine = null;
- private MExpenseType = null;
- private MRfQResponseLineQty = null;
- private MFactAcct = null;
- private MRfQTopic = null;
- private MFormAccess = null;
- private MRfQTopicSubscriber = null;
- private MForm = null;
- private MRfQTopicSubscriberOnly = null;
- private MGLCategory = null;
- private MRMA = null;
- private MGoal = null;
- private MRMALine = null;
- private MGoalRestriction = null;
- private MScheduler = null;
- private MGroup = null;
- private MSchedulerLog = null;
- private MHierarchy = null;
- private MSchedulerPara = null;
- private MIndex = null;
- private MSchedulerRecipient = null;
- private MIndexStop = null;
- private MSerNoCtl = null;
- private MInfoColumn = null;
- private MSetup = null;
- private MInfoWindow = null;
- private MShipper = null;
- private MInOutConfirm = null;
- private MSLACriteria = null;
- private MInOut = null;
- private MSLAGoal = null;
- private MInOutLineConfirm = null;
- private MSLAMeasure = null;
- private MInOutLine = null;
- private MStatusCategory = null;
- private MInOutLineMA = null;
- private MStatus = null;
- private MInterestArea = null;
- private MStorage = null;
- private MInventory = null;
- private MStore = null;
- private MInventoryLine = null;
- private MTask = null;
- private MInventoryLineMA = null;
- private MTaxCategory = null;
- private MInvoiceBatch = null;
- private MTaxDeclarationAcct = null;
- private MInvoiceBatchLine = null;
- private MTaxDeclaration = null;
- private MInvoice = null;
- private MTaxDeclarationLine = null;
- private MInvoiceLine = null;
- private MTax = null;
- private MInvoicePaySchedule = null;
- private MTaxPostal = null;
- private MInvoiceSchedule = null;
- private MTemplate = null;
- private MInvoiceTax = null;
- private MTimeExpense = null;
- private MJournalBatch = null;
- private MTimeExpenseLine = null;
- private MJournal = null;
- private MTransaction = null;
- private MJournalLine = null;
- private MTree = null;
- private MKCategory = null;
- private MTreeNode = null;
- private MLandedCostAllocation = null;
- private MultiMap = null;
- private MLandedCost = null;
- private MUOMConversion = null;
- private MLdapAccess = null;
- private MUOM = null;
- private MLdapProcessor = null;
- private MUserMail = null;
- private MLdapProcessorLog = null;
- private MWarehousePrice = null;
- private MLdapUser = null;
- private MWebProjectDomain = null;
- private MLotCtl = null;
- private MWebProject = null;
- private MLot = null;
- private MWithholding = null;
- private MMailMsg = null;
- private MYear = null;
-
-
-
- // from dbPort/src/org/compiere/model
-
- private MAccessLog = null;
- private MIssueProject = null;
- private MRecordAccess = null;
- private MAccount = null;
- private MIssueSystem = null;
- private MRefList = null;
- private MAccountLookup = null;
- private MIssueUser = null;
- private MRegion = null;
- private MAcctSchemaDefault = null;
- private MLanguage = null;
- private M_Registration = null;
- private MAcctSchemaElement = null;
- private MLocation = null;
- private MRole = null;
- private MAcctSchemaGL = null;
- private MLocationLookup = null;
- private MRoleOrgAccess = null;
- private MAcctSchema = null;
- private MLocator = null;
- private MRoleTest = null;
- private MArchive = null;
- private MLocatorLookup = null;
- private MSalesRegion = null;
- private MAttachmentEntry = null;
- private MLookupCache = null;
- private MSequence = null;
- private MAttachment = null;
- private MLookupFactory = null;
- private MSession = null;
- private MAttachmentNote = null;
- private MLookupInfo = null;
- private MSysConfig = null;
- private MChangeLog = null;
- private MLookup = null;
- private MSystem = null;
- private MClientInfo = null;
- private MMenu = null;
- private MTab = null;
- private MClient = null;
- private MMessage = null;
- private MTableAccess = null;
- private MClientShare = null;
- private MNote = null;
- private MTable = null;
- private MColumnAccess = null;
- private ModelValidationEngine = null;
- private MTest = null;
- private MColumn = null;
- private ModelValidator = null;
- private MTree_Base = null;
- private MConversionRate = null;
- private MOrgInfo = null;
- private MTree_NodeBP = null;
- private MConversionType = null;
- private MOrg = null;
- private MTree_NodeCMC = null;
- private MCostElement = null;
- private MPackageExpCommon = null;
- private MTree_NodeCMS = null;
- private MCostType = null;
- private MPackageExpDetail = null;
- private MTree_Node = null;
- private MCountry = null;
- private MPackageExp = null;
- private MTree_NodeMM = null;
- private MCurrencyAcct = null;
- private MPAttributeLookup = null;
- private MTree_NodePR = null;
- private MCurrency = null;
- private MPInstance = null;
- private MUser = null;
- private MDocType = null;
- private MPInstanceLog = null;
- private MUserOrgAccess = null;
- private M_Element = null;
- private MPInstancePara = null;
- private MUserRoles = null;
- private MElement = null;
- private MPrivateAccess = null;
- private MWarehouse = null;
- private MElementValue = null;
- private MProcessAccess = null;
- private MWindowAccess = null;
- private MField = null;
- private MProcess = null;
- private MWindow = null;
- private MImage = null;
- private MProcessPara = null;
- private MIssue = null;
- private MQuery = null;
-
- public int getC_Region_ID(String Region) {
- String sql = "select c_region_id from c_region where name = ?";
- PreparedStatement pstmt = null;
- ResultSet rs = null;
-
- int C_Region_ID = -1;
-
- try {
- pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, getTrxName());
- pstmt.setString(1, Region);
- rs = pstmt.executeQuery();
-
-
- while (rs.next()) {
- C_Region_ID = rs.getInt(1);
- }
- } catch (SQLException e) {
- fail(e.getLocalizedMessage());
- } finally {
- DB.close( rs, pstmt );
- }
-
- return C_Region_ID;
- }
-
- public int getC_Country_ID(String Country) {
- String sql = "select c_country_id from c_country where name = ?";
- PreparedStatement pstmt = null;
- ResultSet rs = null;
-
- int C_Country_ID = -1;
-
- try {
- pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, getTrxName());
- pstmt.setString(1, Country);
- rs = pstmt.executeQuery();
-
-
- while (rs.next()) {
- C_Country_ID = rs.getInt(1);
- }
- } catch (SQLException e) {
- fail(e.getLocalizedMessage());
- } finally {
- DB.close( rs, pstmt );
- }
-
- return C_Country_ID;
- }
-
- public void testCreateMBPartner()
- {
- try {
- m_partner = new MBPartner (getCtx(), 0, getTrxName());
- m_partner.setValue ("");
- m_partner.setName ("Test MBPartner");
- m_partner.setName2 (null);
- m_partner.setDUNS("");
- m_partner.setFirstSale(null);
- //
- m_partner.setSO_CreditLimit (Env.ZERO);
- m_partner.setSO_CreditUsed (Env.ZERO);
- m_partner.setTotalOpenBalance (Env.ZERO);
- // s_m_partner.setRating(null);
- //
- m_partner.setActualLifeTimeValue(Env.ZERO);
- m_partner.setPotentialLifeTimeValue(Env.ZERO);
- m_partner.setAcqusitionCost(Env.ZERO);
- m_partner.setShareOfCustomer(0);
- m_partner.setSalesVolume(0);
-
- MBPGroup m_group = new MBPGroup (getCtx(), 0, getTrxName());
- m_group.setName ("Test Group Name"); // N
- m_group.setIsConfidentialInfo (false); // N
- m_group.setIsDefault (false);
-
- m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same);
-
- m_group.saveEx();
-
- m_partner.setBPGroup(m_group);
- // Reset Created, Updated to current system time ( teo_sarca )
- m_partner.saveEx();
-
- commit();
- } catch(Exception e) {
- fail(e.getLocalizedMessage());
- }
-
- } */
- public void testBPartner() {
- MBPartner test = MBPartner.getBPartnerCashTrx(getCtx(), 11);
- assertTrue("Confirming right BPartner record", test.getC_BPartner_ID() == 112);
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MCashBookTest.java b/org.adempiere.extend/src/test/functional/MCashBookTest.java
deleted file mode 100644
index bb675a59ca..0000000000
--- a/org.adempiere.extend/src/test/functional/MCashBookTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MCashBook;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MCashBookTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MCashBook cshbk = MCashBook.get(getCtx(), 11, 100);
- assertTrue("Must have cash book", cshbk.getC_CashBook_ID()==101);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MClientTest.java b/org.adempiere.extend/src/test/functional/MClientTest.java
deleted file mode 100644
index a6e5b6478f..0000000000
--- a/org.adempiere.extend/src/test/functional/MClientTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MClient;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MClientTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MClient[] allClients = MClient.getAll(getCtx());
- assertTrue("atrributes must have values", allClients.length > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MColorTest.java b/org.adempiere.extend/src/test/functional/MColorTest.java
deleted file mode 100644
index 20767e1982..0000000000
--- a/org.adempiere.extend/src/test/functional/MColorTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MColor;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MColorTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MColor clr = new MColor(getCtx(),1,getTrxName()); //red1 put in dummy record that has COLORTYPE = 'R' for and ADImageID = 101
- assertTrue("Color must be right", clr.getAD_Image_ID() > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MContactInterestTest.java b/org.adempiere.extend/src/test/functional/MContactInterestTest.java
deleted file mode 100644
index 7be86653cb..0000000000
--- a/org.adempiere.extend/src/test/functional/MContactInterestTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MContactInterest;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MContactInterestTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- { //red1 tested InterestArea_ID with true and false conditions (101 retValue not null, 100 - retValue = null)
- MContactInterest retValue = MContactInterest.get(getCtx(), 101, 104, true, getTrxName());
- assertTrue("interest area must have record",retValue.get_ID()>0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MCostDetailTest.java b/org.adempiere.extend/src/test/functional/MCostDetailTest.java
deleted file mode 100644
index 608b14d021..0000000000
--- a/org.adempiere.extend/src/test/functional/MCostDetailTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MCostDetail;
-import org.compiere.model.MProduct;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MCostDetailTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MCostDetail cd = MCostDetail.get(getCtx(), "C_InvoiceLine_ID=?", 1000003, 1000001, 1000001, getTrxName());
- assertTrue("Such Cost Detail record exists", cd.get_ID() > 0);
- MProduct prod = new MProduct(getCtx(),1000002,getTrxName());
- assertTrue("must have true result", MCostDetail.processProduct(prod, getTrxName())); //red1 test mock falce recs in MCostDetail
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MCostElementTest.java b/org.adempiere.extend/src/test/functional/MCostElementTest.java
deleted file mode 100644
index a71eb43da9..0000000000
--- a/org.adempiere.extend/src/test/functional/MCostElementTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import java.util.Collection;
-
-import org.compiere.model.MClient;
-import org.compiere.model.MCostElement;
-import org.compiere.model.X_M_CostElement;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro // copied by red1 from MInvoiceTest
- */
-public class MCostElementTest extends AdempiereTestCase
-{
- public static final int BPARTNER_Standard = 112;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- X_M_CostElement ce =new X_M_CostElement(getCtx(), 102, null);
- MClient client = MClient.get(ce.getCtx());
- MCostElement retValue = MCostElement.getMaterialCostElement(client, "F"); //red1 -- change to "S" and"I" to test firstOnly() (false/true)
- //red1 -- remove .getCtx to test Public static MCostElement getMaterialCostElement (PO po, String CostingMethod)
- assertTrue("getMaterialCostElement returns value", retValue.getName().equals("Fifo")); //red1 -- options above will fail this return (OK)
- //testquery1
-
- Collection retValue2 = MCostElement.getCostElementsWithCostingMethods(client);
- assertTrue("getostElementsWithCostingMethods returns 8", retValue2.size() == 8);
- //testquery2
-
- MCostElement[] retValue3 = MCostElement.getCostingMethods(client);
- assertTrue("getCostingMethods returns 4", retValue3.length == 4);
- //testquery3
-
- MCostElement[] retValue4 = MCostElement.getNonCostingMethods(client);
- assertTrue("getNonCostingMethods returns 1", retValue4.length == 1);
- //testquery3
-
- MCostElement[] retValue5 = MCostElement.getElements(client.getCtx(), null);
- assertTrue("getElements returns 8", retValue5.length == 8);
- //testquery3
-
- Collection retValue6 = MCostElement.getByCostingMethod(client.getCtx(), "F");
- assertTrue("getByCostingMethod has recs", retValue6.size() > 0);
- //testquery3
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MCurrencyAcctTest.java b/org.adempiere.extend/src/test/functional/MCurrencyAcctTest.java
deleted file mode 100644
index d240bac759..0000000000
--- a/org.adempiere.extend/src/test/functional/MCurrencyAcctTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MAcctSchemaDefault;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MCurrencyAcctTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- { //red1 create C_Currency_Acct wih SchemaDef = 101 and C_Currency = 100
- @SuppressWarnings("unused")
- MAcctSchemaDefault as = MAcctSchemaDefault.get(getCtx(), 101);
-
-// IDEMPIERE-362 Hide things that don't work on iDempiere
-
- //int a = as.getRealizedGain_Acct(100);
- //assertTrue("No test record been setup", a > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MDistributionTest.java b/org.adempiere.extend/src/test/functional/MDistributionTest.java
deleted file mode 100644
index 0e4fa1137f..0000000000
--- a/org.adempiere.extend/src/test/functional/MDistributionTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MDistribution;
-import org.compiere.model.MDistributionLine;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MDistributionTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MDistribution dist = new MDistribution(getCtx(), 100, getTrxName());
- MDistributionLine[] dl = dist.getLines(true); //red1 test with false no effect as mlines is null
- assertTrue("Dist Lines exists", dl.length > 0);
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MInvoiceTest.java b/org.adempiere.extend/src/test/functional/MInvoiceTest.java
deleted file mode 100644
index d8a50400f6..0000000000
--- a/org.adempiere.extend/src/test/functional/MInvoiceTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MInOutLine;
-import org.compiere.model.MInvoice;
-import org.compiere.model.MInvoiceLine;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 reused for InvoiceLine test
- */
-public class MInvoiceTest extends AdempiereTestCase
-{
- public static final int BPARTNER_TreeFarm = 114;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MInvoice.setIsPaid(getCtx(), BPARTNER_TreeFarm, getTrxName());
-
- MInvoice[] invoices = MInvoice.getOfBPartner(getCtx(), BPARTNER_TreeFarm, getTrxName());
- assertTrue("Partner "+BPARTNER_TreeFarm+" should have invoices", invoices.length > 0);
-
- for (MInvoice invoice : invoices)
- {
- invoice.getLines(true); // test query
- invoice.getTaxes(true); // test query
- }
- //test MinvoiceLine getOfInOutLine
- MInOutLine iol = new MInOutLine(getCtx(),101,getTrxName()); //get InOutLine thats from InvoiceLine
- MInvoiceLine invl = MInvoiceLine.getOfInOutLine(iol);
- assertTrue("getOfInOutLine must work",invl.get_ID()>0);
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MLotTest.java b/org.adempiere.extend/src/test/functional/MLotTest.java
deleted file mode 100644
index 1082fae83a..0000000000
--- a/org.adempiere.extend/src/test/functional/MLotTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MLot;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 copy from MInvoiceTest
- */
-public class MLotTest extends AdempiereTestCase
-{
- public static final int BPARTNER_TreeFarm = 114;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- // to set up record - in a clean seed database
- // open material receipt window
- // create a material receipt for the product Fertilizer #50
- // and push the "New Record" button on the attribute set instance dialog
- MLot retValue = MLot.getProductLot(getCtx(), 136, "100", getTrxName());
- assertTrue("Last Lot Rec is 101", retValue.getM_Lot_ID() == 1000000);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MMatchInvTest.java b/org.adempiere.extend/src/test/functional/MMatchInvTest.java
deleted file mode 100644
index 2d4e5c3ea4..0000000000
--- a/org.adempiere.extend/src/test/functional/MMatchInvTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- */
-package test.functional;
-
-import java.util.Properties;
-
-import org.compiere.model.MMatchInv;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca
- *
- */
-public class MMatchInvTest extends AdempiereTestCase
-{
- /**
- * Only check if new API was correctly introduced
- */
- public void testNewQueryAPI() throws Exception
- {
- Properties ctx = getCtx();
- String trxName = getTrxName();
- int C_Invoice_ID = 100;
- int C_InvoiceLine_ID = 100;
- int M_InOut_ID = 100;
- int M_InOutLine_ID = 100;
- //
- MMatchInv.get(ctx, M_InOutLine_ID, C_InvoiceLine_ID, trxName);
- MMatchInv.getInvoice(ctx, C_Invoice_ID, trxName);
- MMatchInv.getInvoiceLine(ctx, C_InvoiceLine_ID, trxName);
- MMatchInv.getInOut(ctx, M_InOut_ID, trxName);
- MMatchInv.getInOutLine(ctx, M_InOutLine_ID, trxName);
- }
-}
diff --git a/org.adempiere.extend/src/test/functional/MMediaServerTest.java b/org.adempiere.extend/src/test/functional/MMediaServerTest.java
deleted file mode 100644
index 2c382c737a..0000000000
--- a/org.adempiere.extend/src/test/functional/MMediaServerTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MMediaServer;
-import org.compiere.model.MWebProject;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrowed from MInvoiceTest
- */
-public class MMediaServerTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MWebProject m_project = new MWebProject(getCtx(),102,getTrxName());
- MMediaServer[] mserver = MMediaServer.getMediaServer(m_project);
- assertTrue("MediaServer must have values", mserver.length > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MMenuTest.java b/org.adempiere.extend/src/test/functional/MMenuTest.java
deleted file mode 100644
index a5fe50a5c3..0000000000
--- a/org.adempiere.extend/src/test/functional/MMenuTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MMenu;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MMenuTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MMenu[] menus = MMenu.get(getCtx(), "AD_Menu_ID=100",null); //red1 tested with null and IsActive - no failures
- assertTrue("atrributes must have values", menus.length > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MPInstanceTest.java b/org.adempiere.extend/src/test/functional/MPInstanceTest.java
deleted file mode 100644
index f9c314b22d..0000000000
--- a/org.adempiere.extend/src/test/functional/MPInstanceTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MPInstance;
-import org.compiere.model.MPInstancePara;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro
- */
-public class MPInstanceTest extends AdempiereTestCase
-{
- private MPInstance lines = null;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- lines = new MPInstance(getCtx(), 1000000, getTrxName());
- MPInstancePara[] params = lines.getParameters();
- assertTrue("There should be params", params.length > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MPaySelectionTest.java b/org.adempiere.extend/src/test/functional/MPaySelectionTest.java
deleted file mode 100644
index 3036e3cf15..0000000000
--- a/org.adempiere.extend/src/test/functional/MPaySelectionTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MPaySelection;
-import org.compiere.model.MPaySelectionLine;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro
- */
-public class MPaySelectionTest extends AdempiereTestCase
-{
- private MPaySelection lines = null;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- lines = new MPaySelection(getCtx(), 100, getTrxName());
- MPaySelectionLine[] payselection = lines.getLines(true);
- assertTrue("There should be payment lines", payselection.length > 0);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MPaymentTest.java b/org.adempiere.extend/src/test/functional/MPaymentTest.java
deleted file mode 100644
index 4311d5de0c..0000000000
--- a/org.adempiere.extend/src/test/functional/MPaymentTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MPayment;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro // copied by red1 from MInvoiceTest
- */
-public class MPaymentTest extends AdempiereTestCase
-{
- public static final int BPARTNER_Standard = 112;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MPayment.getOfBPartner(getCtx(), BPARTNER_Standard, getTrxName());
-
- MPayment[] payments = MPayment.getOfBPartner(getCtx(), BPARTNER_Standard, getTrxName());
- assertTrue("Partner "+BPARTNER_Standard+" should have payments", payments.length > 0);
- //testquery
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MPriceListVersionTest.java b/org.adempiere.extend/src/test/functional/MPriceListVersionTest.java
deleted file mode 100644
index 495078289c..0000000000
--- a/org.adempiere.extend/src/test/functional/MPriceListVersionTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MPriceListVersion;
-import org.compiere.model.MProductPrice;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro //red1 borrows from MInvoiceTest
- */
-public class MPriceListVersionTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MPriceListVersion plv = new MPriceListVersion(getCtx(), 101, getTrxName());
- MProductPrice[] pp = plv.getProductPrice("AND isActive='Y'"); //red1 tested also with (true) and (false)
- assertTrue("product must have prices", pp.length > 0);
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MProductBOMTest.java b/org.adempiere.extend/src/test/functional/MProductBOMTest.java
deleted file mode 100644
index 9b82fb008d..0000000000
--- a/org.adempiere.extend/src/test/functional/MProductBOMTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MBOM;
-import org.compiere.model.MProductBOM;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro // used by red1
- */
-public class MProductBOMTest extends AdempiereTestCase
-{
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MProductBOM[] lines = MProductBOM.getBOMLines(getCtx(), 145, getTrxName());
- assertTrue("ProductBOM should have lines", lines.length > 0);
- }
- private MBOM bom = null;
-
- public void testBOMCreation() {
- bom = new MBOM(getCtx(), 0, getTrxName());
- // BOM load test case of qualified bom parent for testing MBOM.getOfProduct
- bom.setM_Product_ID(134);
- bom.setBOMType("A");
- bom.setName("PatioTable");
-
- boolean saveResult = bom.save(); //
- assertTrue("MBOM.save()", saveResult);
- try {
- commit();
- } catch (Exception e) {
- fail(e.getLocalizedMessage());
- }
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MProductTest.java b/org.adempiere.extend/src/test/functional/MProductTest.java
deleted file mode 100644
index cff3bfb19f..0000000000
--- a/org.adempiere.extend/src/test/functional/MProductTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-//MProductTest.java
-package test.functional;
-
-import org.compiere.model.MProductPrice;
-
-import test.AdempiereTestCase;
-
-public class MProductTest extends AdempiereTestCase {
-/*
- public int getProduct_Category_ID(String productCategory) {
- String sql = "select m_product_category_id from m_product_category where name = ?";
- PreparedStatement pstmt = null;
- ResultSet rs = null;
-
- int M_ProductCategory_ID = -1;
-
- try {
- pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, getTrxName());
- pstmt.setString(1, productCategory.trim());
- rs = pstmt.executeQuery();
-
-
- while (rs.next()) {
- M_ProductCategory_ID = rs.getInt(1);
- }
- } catch (SQLException e) {
- fail(e.getLocalizedMessage());
- } finally {
- DB.close( rs, pstmt );
- }
-
- return M_ProductCategory_ID;
-
- }
-
- public int getUOM_ID(String UOM) {
- System.out.println("In getUOM_ID");
-
- String sql = "select c_uom_id from c_uom where name = ?";
- PreparedStatement pstmt = null;
- ResultSet rs = null;
-
- int C_Uom_ID = -1;
-
- try {
- pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, getTrxName());
- pstmt.setString(1, UOM.trim());
- rs = pstmt.executeQuery();
-
-
- while (rs.next()) {
- C_Uom_ID = rs.getInt(1);
- }
- } catch (SQLException e) {
- fail(e.getLocalizedMessage());
- } finally {
- DB.close( rs, pstmt );
- }
- System.out.println("Uom: " + UOM);
- System.out.println("C_Uom_ID: " + C_Uom_ID);
-
- return C_Uom_ID;
-
- }
-
- public void testCreateMProduct() {
- MProduct m_product = new MProduct(getCtx(), 0, getTrxName());
- m_product.setAD_Org_ID(0);
- m_product.setProductType (X_I_Product.PRODUCTTYPE_Item); // I
- m_product.setIsBOM (false); // N
- m_product.setIsInvoicePrintDetails (false);
- m_product.setIsPickListPrintDetails (false);
- m_product.setIsPurchased (true); // Y
- m_product.setIsSold (true); // Y
- m_product.setIsStocked (true); // Y
- m_product.setIsSummary (false);
- m_product.setIsVerified (false); // N
- m_product.setIsWebStoreFeatured (false);
- m_product.setIsSelfService(true);
- m_product.setIsExcludeAutoDelivery(false);
- m_product.setProcessing (false); // N
- m_product.setName("Test Product"); // N
- m_product.setC_UOM_ID(getUOM_ID("Each"));
-
- boolean saveResult = m_product.saveEx();
- assertEquals("Create new product.", true, saveResult);
- }
-
- public void testSetBaseInfo() {
- MProductPricing prodprice = new MProductPricing(122,100, Env.ONEHUNDRED,true);
- int uom = 0;
- uom = prodprice.getC_UOM_ID();
- assertTrue("UOM must be correct", uom == 100);
- } */
-
- public void testPrice() {
- MProductPrice test = MProductPrice.get(getCtx(), 105, 124, getTrxName());
- assertTrue("Confirming Prod ID to be true", test.getM_Product_ID() == 124);
- }
-}
diff --git a/org.adempiere.extend/src/test/functional/MProjectTest.java b/org.adempiere.extend/src/test/functional/MProjectTest.java
deleted file mode 100644
index 842351ad04..0000000000
--- a/org.adempiere.extend/src/test/functional/MProjectTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MProject;
-import org.compiere.model.MProjectIssue;
-import org.compiere.model.MProjectLine;
-import org.compiere.model.MProjectPhase;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro // used by red1
- */
-public class MProjectTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MProject proj = new MProject(getCtx(),101,null);
- {
- //test ProjectLines
- MProjectLine[] lines = proj.getLines();
- assertTrue("There should be lines in this project", lines.length > 0);
- }
- {
- //test ProjectIssue
- MProjectIssue[] issues = proj.getIssues();
- assertTrue("There are no issues in this project", issues.length == 0);
- }
- {
- //test ProjectPhase
- MProjectPhase[] lines = proj.getPhases();
- assertTrue("There are no phases in this project", lines.length == 0);
- }
- }
-}
diff --git a/org.adempiere.extend/src/test/functional/MRequestTypeTest.java b/org.adempiere.extend/src/test/functional/MRequestTypeTest.java
deleted file mode 100644
index f631bc4bd2..0000000000
--- a/org.adempiere.extend/src/test/functional/MRequestTypeTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MRequestType;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro
- */
-public class MRequestTypeTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MRequestType req = MRequestType.getDefault(getCtx());
- assertTrue("There should be default requesttype", req.getAD_Client_ID() == 11);
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/MRuleTest.java b/org.adempiere.extend/src/test/functional/MRuleTest.java
deleted file mode 100644
index 115a87de74..0000000000
--- a/org.adempiere.extend/src/test/functional/MRuleTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import java.util.List;
-
-import org.compiere.model.MRule;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-/**
- * @author Teo Sarca, www.arhipac.ro
- */
-public class MRuleTest extends AdempiereTestCase
-{
- public static final int BPARTNER_TreeFarm = 114;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- MRule getrule = MRule.get(getCtx(), "beanshell:getAvailable");
- assertTrue("BeanRule must be exact", getrule.getAD_Rule_ID()==1000000);
- List rules = MRule.getModelValidatorLoginRules(getCtx());
- assertTrue("Rules has array", rules.size() > 0); //red1 set in DB Rule.EventType = L before testing
-
- }
-
-}
diff --git a/org.adempiere.extend/src/test/functional/TrifonTest.java b/org.adempiere.extend/src/test/functional/TrifonTest.java
deleted file mode 100644
index 2baa807b5f..0000000000
--- a/org.adempiere.extend/src/test/functional/TrifonTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package test.functional;
-
-import org.compiere.model.MColumn;
-import org.compiere.model.MInvoice;
-import org.compiere.model.MReference;
-import org.compiere.model.MTable;
-import org.compiere.util.Env;
-
-import test.AdempiereTestCase;
-
-public class TrifonTest extends AdempiereTestCase {
-
- // Test: Specific variables
- //private MProduct product = null;
-
- public void testMProductCreation() {
-
- MTable mTable = MTable.get(Env.getCtx(), MInvoice.Table_Name );
- System.out.println("XML presentation... is: " + mTable.get_xmlDocument(false));
-
- MColumn mcolumn[] = mTable.getColumns(true);
-
- for (int i = 0; i < mcolumn.length; i++) {
-
- System.out.println("Name............ is: " + mcolumn[i].getName());
- System.out.println("ColumnName...... is: " + mcolumn[i].getColumnName());
- System.out.println("Desc............ is: " + mcolumn[i].getDescription());
- System.out.println("Length.......... is: " + mcolumn[i].getFieldLength());
- System.out.println("Reference_ID.... is: " + mcolumn[i].getAD_Reference_ID());
- MReference reference = new MReference(Env.getCtx(), mcolumn[i].getAD_Reference_ID(), getTrxName());
- System.out.println("ReferenceName... is: " + reference.getName());
- System.out.println("..............................");
- }
-
- assertTrue(this.getClass().getName(), true);
- }
-}
\ No newline at end of file
diff --git a/org.adempiere.extend/src/test/functional/WorkflowTest.java b/org.adempiere.extend/src/test/functional/WorkflowTest.java
deleted file mode 100644
index d050bde38b..0000000000
--- a/org.adempiere.extend/src/test/functional/WorkflowTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional;
-
-import org.compiere.model.MRequisition;
-import org.compiere.model.Query;
-import org.compiere.util.Env;
-import org.compiere.wf.MWFActivity;
-import org.compiere.wf.MWFEventAudit;
-import org.compiere.wf.MWFNode;
-import org.compiere.wf.MWFNodeNext;
-import org.compiere.wf.MWFNodePara;
-import org.compiere.wf.MWFProcess;
-import org.compiere.wf.MWorkflow;
-import org.compiere.wf.MWorkflowProcessor;
-
-import test.AdempiereTestCase;
-
-/**
- * Test Workflow related classes
- * @author Teo Sarca, www.arhipac.ro
- */
-public class WorkflowTest extends AdempiereTestCase
-{
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx()));
- }
-
- public void testQuery() throws Exception
- {
- //
- // Check MWFActivity
- int AD_Table_ID = MRequisition.Table_ID;
- int Record_ID = 1; // dummy;
- MWFActivity.get(getCtx(), AD_Table_ID, Record_ID, false);
- MWFActivity.get(getCtx(), AD_Table_ID, Record_ID, true);
- //
- // Check MWFEventAudit
- int AD_WF_Process_ID = 1; // dummy
- int AD_WF_Node_ID = 1; // dummy
- MWFEventAudit.get(getCtx(), AD_WF_Process_ID, AD_WF_Node_ID, getTrxName());
- MWFEventAudit.get(getCtx(), AD_WF_Process_ID, getTrxName());
- //
- // Check MWFProcess
- MWFProcess proc = new Query(getCtx(), MWFProcess.Table_Name, null, getTrxName())
- .setClient_ID()
- .setOrderBy(MWFProcess.COLUMNNAME_AD_WF_Process_ID)
- .first();
- if (proc != null)
- {
- proc.getActivities(true, false, getTrxName());
- proc.getActivities(true, true, getTrxName());
- }
- else
- {
- // TODO: check MWFProcess - need better test
- }
- //
- // Check MWorkflow, MWFNode, MWFNodeNext etc
- int AD_Client_ID = getAD_Client_ID();
- int AD_Workflow_ID = 115; // Process_Requisition
- MWorkflow wf = MWorkflow.get(getCtx(), AD_Workflow_ID);
- for (MWFNode node : wf.getNodes(false, AD_Client_ID))
- {
- MWFNodePara.getParameters(node.getCtx(), node.getAD_WF_Node_ID());
-
- for (MWFNodeNext next : node.getTransitions(AD_Client_ID))
- {
- next.getConditions(true);
- next.getConditions(false);
- }
- }
- //
- // Check MWorkflowProcessor
- for (MWorkflowProcessor processor : MWorkflowProcessor.getActive(getCtx()))
- {
- processor.getLogs();
- }
- //
- //
- }
-}
diff --git a/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java b/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java
deleted file mode 100644
index 3468ca553e..0000000000
--- a/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2009 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional.inventory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.text.DateFormat;
-import java.text.DecimalFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-import org.supercsv.io.CsvListReader;
-import org.supercsv.io.ICsvListReader;
-import org.supercsv.prefs.CsvPreference;
-
-/**
- * @author Teo Sarca, www.arhipac.ro
- */
-public class CSVFactory
-{
- public static final DateFormat s_dateFormat = new SimpleDateFormat("dd.MM.yyyy");
-
- private ICsvListReader reader;
-
- public Collection read(InputStream in) throws Exception
- {
- ArrayList tests = new ArrayList();
- //
- reader = new CsvListReader(new InputStreamReader(in), CsvPreference.STANDARD_PREFERENCE);
- String[] header = getCSVHeader();
- //
- List line;
- int last_lineNo = -1;
- MMScenario scenario = null;
- try
- {
- while ( (line = reader.read()) != null)
- {
- if (last_lineNo == -1 || last_lineNo + 1 < reader.getLineNumber())
- {
- if (scenario != null)
- {
- tests.add(scenario);
- }
- scenario = new MMScenario("junit-test-line_"+(new DecimalFormat("000").format(reader.getLineNumber())));
- }
- readDocument(scenario, header, line);
- last_lineNo = reader.getLineNumber();
- }
- }
- catch (Exception e)
- {
- throw new RuntimeException("Error on line "+reader.getLineNumber()+": "+e.getLocalizedMessage(), e);
- }
- if (scenario != null)
- {
- tests.add(scenario);
- }
- //
- return tests;
- }
-
- private String[] getCSVHeader() throws IOException
- {
- String[] header = reader.getHeader(true);
- for (int i = 0; i < header.length; i++)
- {
- header[i] = header[i].trim().replaceAll("\\s", "");
- }
- return header;
- }
-
- private void readDocument(MMScenario scenario, String[] header, List line)
- {
- MMDocument doc = new MMDocument(scenario);
- doc.csvLineNo = reader.getLineNumber();
- doc.DocBaseType = getValue("DocType", String.class, header, line);
- doc.DocumentNo = getValue("DocumentNo", String.class, header, line);
- doc.LocatorValue = getValue("LocatorValue", String.class, header, line);
- doc.LocatorValueTo = getValue("LocatorValueTo", String.class, header, line);
- doc.ProductValue = getValue("ProductValue", String.class, header, line);
- doc.Price = getValue("Price", BigDecimal.class, header, line);
- doc.Qty = getValue("Qty", BigDecimal.class, header, line);
- doc.QtyOrdered = getValue("QtyOrdered", BigDecimal.class, header, line);
- doc.QtyReserved = getValue("QtyReserved", BigDecimal.class, header, line);
- doc.ASI = getValue("ASI", String.class, header, line);
- doc.Date = getValue("MovementDate", Timestamp.class, header, line);
- doc.PODocumentNo = getValue("PODocumentNo", String.class, header, line);
- doc.IsReversal = getValue("IsReversal", Boolean.class, header, line);
- scenario.docs.add(doc);
- }
-
- /**
- * TODO: refactor
- * @param
- * @param name
- * @param clazz
- * @param headers
- * @param values
- * @return
- */
- @SuppressWarnings("unchecked")
- public static T getValue(String name, Class clazz, String[] headers, List values)
- {
- String value = null;
- for (int i = 0; i < headers.length; i++)
- {
- if (name.equalsIgnoreCase(headers[i]))
- {
- if (values.size() > i)
- {
- value = values.get(i);
- }
- break;
- }
- }
- if (value != null && value.trim().length() == 0)
- {
- value = null;
- }
- //
- if (String.class == clazz)
- {
- return (T)value;
- }
- else if (BigDecimal.class == clazz)
- {
- if (value == null)
- return (T)BigDecimal.ZERO;
- else
- return (T)new BigDecimal(value);
- }
- else if (Integer.class == clazz)
- {
- if (value == null)
- return (T)Integer.valueOf(0);
- else
- return (T)((Integer)Integer.parseInt(value));
- }
- else if (Timestamp.class == clazz)
- {
- if (value == null)
- return null;
- else
- {
- try
- {
- Date date = s_dateFormat.parse(value);
- return (T)new Timestamp(date.getTime());
- }
- catch(ParseException e)
- {
- throw new RuntimeException(e);
- }
- }
- }
- else if (Boolean.class == clazz)
- {
- if (value == null)
- return (T)Boolean.FALSE;
- else if ("Y".equals(value))
- return (T)Boolean.TRUE;
- else if ("N".equals(value))
- return (T)Boolean.FALSE;
- else
- throw new IllegalStateException("Invalid boolean value '"+value+"'");
- }
- else
- {
- throw new IllegalArgumentException("clazz not supported - "+clazz);
- }
- }
-}
diff --git a/org.adempiere.extend/src/test/functional/inventory/InventoryTest.java b/org.adempiere.extend/src/test/functional/inventory/InventoryTest.java
deleted file mode 100644
index c859a04c3e..0000000000
--- a/org.adempiere.extend/src/test/functional/inventory/InventoryTest.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/******************************************************************************
- * Product: Adempiere ERP & CRM Smart Business Solution *
- * Copyright (C) 2009 SC ARHIPAC SERVICE SRL. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- *****************************************************************************/
-package test.functional.inventory;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.adempiere.exceptions.AdempiereException;
-import org.adempiere.exceptions.DBException;
-import org.compiere.model.MDocType;
-import org.compiere.model.MLocator;
-import org.compiere.model.MProduct;
-import org.compiere.model.MStorageOnHand;
-import org.compiere.process.DocAction;
-import org.compiere.util.DB;
-import org.compiere.util.Env;
-import org.compiere.util.Trx;
-import org.compiere.util.TrxRunnable;
-import org.compiere.util.Util;
-
-import test.AdempiereTestCase;
-
-
-/**
- * Run Inventory Tests
- * @author Teo Sarca, www.arhipac.ro
- */
-public class InventoryTest extends AdempiereTestCase
-{
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- Env.setContext(Env.getCtx(), "$C_Currency_ID", 346);
-
-// MLocator locator = InventoryUtil.getCreateLocator(-1, "junit-wh1", "l1");
- Env.setContext(Env.getCtx(), "#M_Warehouse_ID", -1);
-
- Env.setContext(Env.getCtx(), "#PO_PriceList_ID",
- InventoryUtil.getCreatePriceList("junit-PO", false).get_ID());
- Env.setContext(Env.getCtx(), "#SO_PriceList_ID",
- InventoryUtil.getCreatePriceList("junit-SO", true).get_ID());
- }
-
- public void test01() throws Exception
- {
- InputStream in;
- if (System.getProperty("TestFile") != null)
- {
- in = new FileInputStream(System.getProperty("TestFile"));
- }
- else //if (System.getProperty("UseArhipacURL") != null)
- {
- String url = "http://spreadsheets.google.com/pub?key=p_F3GDtQxWTA9YbH8MRkyKA&output=csv&gid=0";
- in = new URL(url).openStream();
- }
- //
- CSVFactory factory = new CSVFactory();
- Collection tests = factory.read(in);
- String trxName = getTrxName();
- //
- for (MMScenario scenario : tests)
- {
- // Uncomment below line only if you want to run only one test!
- //if ("junit-test-line_053".compareTo(scenario.name) <= 0)
- runMMScenario(scenario, trxName);
-// break;
- }
- }
-
- private void runMMScenario(MMScenario scenario, String trxName)
-{
- scenario.key = ""+System.currentTimeMillis();
- for (MMDocument doc : scenario.docs)
- {
- boolean ok = false;
- try
- {
- createDocument(doc, trxName);
- ok = true;
- }
- catch (Exception e)
- {
- InventoryTestException ie = (e instanceof InventoryTestException ? (InventoryTestException)e : new InventoryTestException(e));
- ie.scenario = scenario;
- ie.document = doc;
- throw ie;
- }
- finally
- {
- if (!ok)
- {
- dumpStatus(doc, trxName);
- try
- {
- commit();
- }
- catch (Exception e){}
- }
- }
- }
- }
-
- private void createDocument(final MMDocument doc, String trxName)
- {
- Trx.run(trxName, new TrxRunnable(){
- //@Override
- public void run(String trxName) {
- if (doc.IsReversal)
- {
- MMDocument docOrig = doc.scenario.get(doc.DocBaseType, doc.DocumentNo);
- doc.ProductValue = docOrig.ProductValue;
- doc.LocatorValue = docOrig.LocatorValue;
- doc.LocatorValueTo = docOrig.LocatorValueTo;
- InventoryUtil.processDocument(docOrig, DocAction.ACTION_Reverse_Correct, DocAction.STATUS_Reversed);
- return;
- }
-
- if (doc.ProductValue == null)
- throw new RuntimeException("ProductValue is null");
- doc.ProductValue = "junit-"+doc.ProductValue+"-"+doc.scenario.key;
-
- // Check document No conflict
- if (doc.scenario.get(doc.DocBaseType, doc.DocumentNo) != null)
- {
- throw new AdempiereException("DocumentNo conflict - "+doc.DocumentNo);
- }
-
- if (MDocType.DOCBASETYPE_PurchaseOrder.equals(doc.DocBaseType)
- || MDocType.DOCBASETYPE_SalesOrder.equals(doc.DocBaseType) )
- {
- InventoryUtil.createOrder(doc, trxName);
- }
- else if (MDocType.DOCBASETYPE_MaterialReceipt.equals(doc.DocBaseType)
- || MDocType.DOCBASETYPE_MaterialDelivery.equals(doc.DocBaseType) )
- {
- InventoryUtil.createInOut(doc, trxName);
- }
- else if (MDocType.DOCBASETYPE_MaterialMovement.equals(doc.DocBaseType))
- {
- InventoryUtil.createMovement(doc, trxName);
- }
- else if (MDocType.DOCBASETYPE_MaterialPhysicalInventory.equals(doc.DocBaseType))
- {
- InventoryUtil.createInventory(doc, trxName);
- }
- else if ("TST".equals(doc.DocBaseType))
- {
- assertStorage(doc, trxName);
- }
- else
- {
- throw new AdempiereException("DocBaseType not supported for "+doc);
- }
- }});
- }
-
- private void assertStorage(MMDocument doc, String trxName)
- {
- MLocator locator = InventoryUtil.getCreateLocator(-1, doc.LocatorValue, doc.LocatorValue);
- MProduct product = InventoryUtil.getCreateProduct(doc.ProductValue, null);
- int M_ASI_ID = -1;
- if (!Util.isEmpty(doc.ASI, true))
- {
- M_ASI_ID = doc.scenario.getM_ASI_ID(doc.ASI);
- }
- ArrayList