MSysConfigTest:

* fix naming - only test cases should end with "Test" string
* use getSQLValueEx
This commit is contained in:
teo_sarca 2009-04-24 13:16:19 +00:00
parent fd5f62d2e1
commit 1f5c83713d
1 changed files with 7 additions and 6 deletions

View File

@ -33,9 +33,9 @@ public class MSysConfigTest extends AdempiereTestCase {
super.setUp(); super.setUp();
// //
varname = "MSysConfigTestVariable" + System.currentTimeMillis(); varname = "MSysConfigTestVariable" + System.currentTimeMillis();
new SysConfigTest(getCtx(), 0, 0, varname, "0_0", null).save(); new TestableSysConfig(getCtx(), 0, 0, varname, "0_0", null).saveEx();
new SysConfigTest(getCtx(), 11, 0, varname, "11_0", null).save(); new TestableSysConfig(getCtx(), 11, 0, varname, "11_0", null).saveEx();
new SysConfigTest(getCtx(), 11, 11, varname, "11_11", null).save(); new TestableSysConfig(getCtx(), 11, 11, varname, "11_11", null).saveEx();
} }
@Override @Override
@ -44,7 +44,7 @@ public class MSysConfigTest extends AdempiereTestCase {
// //
String sql = "DELETE FROM "+MSysConfig.Table_Name String sql = "DELETE FROM "+MSysConfig.Table_Name
+" WHERE "+MSysConfig.COLUMNNAME_Name+"=?"; +" WHERE "+MSysConfig.COLUMNNAME_Name+"=?";
DB.executeUpdate(sql, new Object[]{varname}, false, null); DB.executeUpdateEx(sql, new Object[]{varname}, null);
} }
public void testGetSet1() throws Exception { public void testGetSet1() throws Exception {
@ -62,10 +62,11 @@ public class MSysConfigTest extends AdempiereTestCase {
assertEquals("11_0", MSysConfig.getValue(varname, 11, 12345)); assertEquals("11_0", MSysConfig.getValue(varname, 11, 12345));
} }
private static class SysConfigTest extends MSysConfig { private static class TestableSysConfig extends MSysConfig
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public SysConfigTest(Properties ctx, public TestableSysConfig(Properties ctx,
int AD_Client_ID, int AD_Org_ID, int AD_Client_ID, int AD_Org_ID,
String Name, String Value, String Name, String Value,
String trxName) String trxName)