diff --git a/extend/src/test/functional/DBTest.java b/extend/src/test/functional/DBTest.java index fde70b098b..ee374f8395 100644 --- a/extend/src/test/functional/DBTest.java +++ b/extend/src/test/functional/DBTest.java @@ -1,6 +1,16 @@ -/** - * - */ +/****************************************************************************** + * 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.math.BigDecimal; diff --git a/extend/src/test/functional/MRefListTest.java b/extend/src/test/functional/MRefListTest.java index e9e9dee643..062a420605 100644 --- a/extend/src/test/functional/MRefListTest.java +++ b/extend/src/test/functional/MRefListTest.java @@ -1,23 +1,40 @@ /****************************************************************************** - * Product: XERP Core * + * 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.MRefList; import org.compiere.model.X_AD_Table; import org.compiere.util.Env; +import org.compiere.util.ValueNamePair; import test.AdempiereTestCase; /** * Test MRefList class - * @author Teo Sarca, SC ARHIPAC SERVICE SRL - * + * @author Teo Sarca, www.arhipac.ro */ public class MRefListTest extends AdempiereTestCase { - public void testGet() throws Exception { + + @Override + protected void setUp() throws Exception + { + super.setUp(); + Env.setContext(getCtx(), Env.LANGUAGE, "en_US"); + } + + public void testGet() throws Exception + { // // Should be found MRefList rl = MRefList.get(getCtx(), @@ -32,11 +49,22 @@ public class MRefListTest extends AdempiereTestCase { assertNull("Should not be found", rl); } - public void testGetListName() throws Exception { - Env.setContext(getCtx(), Env.LANGUAGE, "en_US"); + public void testGetListName() throws Exception + { String name = MRefList.getListName(getCtx(), X_AD_Table.ACCESSLEVEL_AD_Reference_ID, X_AD_Table.ACCESSLEVEL_All); assertEquals("All", name); + // + name = MRefList.getListName(getCtx(), + X_AD_Table.ACCESSLEVEL_AD_Reference_ID, + "InvalidAccessLevelValue"); + assertTrue("Should not be found", org.compiere.util.Util.isEmpty(name)); + } + + public void testGetList() throws Exception + { + ValueNamePair[] vnp = MRefList.getList (getCtx(), X_AD_Table.ACCESSLEVEL_AD_Reference_ID, false); + assertTrue("Invalid result ", vnp.length > 0); } } diff --git a/extend/src/test/functional/MSessionTest.java b/extend/src/test/functional/MSessionTest.java index b4f6af8144..7cebb0225f 100644 --- a/extend/src/test/functional/MSessionTest.java +++ b/extend/src/test/functional/MSessionTest.java @@ -1,6 +1,16 @@ -/** - * - */ +/****************************************************************************** + * 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.MSession; diff --git a/extend/src/test/functional/MStorageTest.java b/extend/src/test/functional/MStorageTest.java index e83bfc893c..b09cc7993a 100644 --- a/extend/src/test/functional/MStorageTest.java +++ b/extend/src/test/functional/MStorageTest.java @@ -1,6 +1,16 @@ -/** - * - */ +/****************************************************************************** + * 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.math.BigDecimal; diff --git a/extend/src/test/functional/MSysConfigTest.java b/extend/src/test/functional/MSysConfigTest.java index a901a9b67a..11e0df1f39 100644 --- a/extend/src/test/functional/MSysConfigTest.java +++ b/extend/src/test/functional/MSysConfigTest.java @@ -1,6 +1,16 @@ -/** - * - */ +/****************************************************************************** + * 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.Properties; diff --git a/extend/src/test/functional/MUOMTest.java b/extend/src/test/functional/MUOMTest.java index 6dee57afb7..d84825f866 100644 --- a/extend/src/test/functional/MUOMTest.java +++ b/extend/src/test/functional/MUOMTest.java @@ -1,6 +1,16 @@ -/** - * - */ +/****************************************************************************** + * 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.MUOM;