KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > graph > log > ActionLogDbTest


1 package org.jbpm.graph.log;
2
3 import org.jbpm.db.AbstractDbTestCase;
4 import org.jbpm.graph.def.Action;
5
6 public class ActionLogDbTest extends AbstractDbTestCase {
7   
8   public void testActionLog() {
9     Action action = new Action();
10     jbpmSession.getSession().save(action);
11     ActionLog actionLog = new ActionLog(action);
12     
13     actionLog = (ActionLog) saveAndReload(actionLog);
14     assertNotNull(actionLog.getAction());
15   }
16
17   public void testActionExceptionLog() {
18     ActionLog actionLog = new ActionLog();
19     actionLog.setException(new IllegalArgumentException JavaDoc("it's not rocket science"));
20     System.out.println("EXCEPTION LENGTH: "+actionLog.getException().length());
21     actionLog = (ActionLog) saveAndReload(actionLog);
22     assertNotNull(actionLog.getException());
23     System.out.println("EXCEPTION LENGTH: "+actionLog.getException().length());
24   }
25   
26   
27 }
28
Popular Tags