Redhuan D. Oon 2010-02-27 15:05:00 +00:00
parent bb3a54da57
commit d940e4d3e9
1 changed files with 14 additions and 0 deletions

View File

@ -28,7 +28,12 @@
***********************************************************************/
package test.functional;
import java.math.BigDecimal;
import org.compiere.model.MAlert;
import org.compiere.model.MAlertProcessor;
import org.compiere.model.MAlertProcessorLog;
import org.compiere.model.MProductPricing;
import org.compiere.model.X_AD_AlertProcessor;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -90,5 +95,14 @@ public class AlertTest extends AdempiereTestCase
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);
}
}