Refactored AlertTest.

Feature Request: [1772015] Generate java Interface and implementation instead of X_ classes

http://sourceforge.net/tracker/index.php?func=detail&aid=1772015&group_id=176962&atid=879335
This commit is contained in:
trifonnt 2007-08-19 00:07:02 +00:00
parent 3477a34340
commit e48495fcd5
1 changed files with 16 additions and 8 deletions

View File

@ -30,7 +30,10 @@ package test.functional;
//import org.compiere.model.I_AD_Alert;
//import org.compiere.model.I_AD_AlertProcessor;
import org.compiere.model.MAlert;
import org.compiere.model.X_AD_AlertProcessor;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Trx;
import test.AdempiereTestCase;
@ -57,21 +60,26 @@ public class AlertTest extends AdempiereTestCase
trx.start();
log.info("trx = " + trx.toString());
// Old way:
//MAlert alert = new MAlert(Env.getCtx(), 100, trx.getTrxName());
//----- Old way:
MAlert alertOldWay = new MAlert(Env.getCtx(), 100, trx.getTrxName());
log.info(alertOldWay.toString());
// New way:
/* I_AD_Alert alert = new MAlert(Env.getCtx(), 100, trx.getTrxName());
X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), trx.getTrxName());
log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID());
boolean resultSave = ((X_AD_Alert) alert).save();
/* //----- New way:
I_AD_Alert alert = new MAlert(Env.getCtx(), 100, trx.getTrxName());
log.info(alert.toString());
//
log.info("alert.getAD_AlertProcessor_ID = " + alert.getAD_AlertProcessor_ID());
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());
*/
//--- Save; TODO - Must be refactored. PO.save must be static method!!!
//boolean resultSave = ((X_AD_Alert) alert).save();
trx.commit();
trx.close();
}