KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > taskmgmt > log > SwimlaneLogDbTest


1 package org.jbpm.taskmgmt.log;
2
3 import org.jbpm.db.AbstractDbTestCase;
4 import org.jbpm.taskmgmt.exe.SwimlaneInstance;
5
6 public class SwimlaneLogDbTest extends AbstractDbTestCase {
7   
8   SwimlaneInstance swimlaneInstance = null;
9   
10   public void setUp() {
11     super.setUp();
12     
13     swimlaneInstance = new SwimlaneInstance();
14     jbpmSession.getSession().save(swimlaneInstance);
15   }
16
17   public void testSwimlaneCreateLog() {
18     SwimlaneCreateLog SwimlaneCreateLog = new SwimlaneCreateLog(swimlaneInstance,"you");
19     jbpmSession.getSession().save(SwimlaneCreateLog);
20     
21     newTransaction();
22     
23     SwimlaneCreateLog = (SwimlaneCreateLog) jbpmSession.getSession().load(SwimlaneCreateLog.class, new Long JavaDoc(SwimlaneCreateLog.getId()));
24     assertNotNull(SwimlaneCreateLog);
25     assertNotNull(SwimlaneCreateLog.getSwimlaneInstance());
26   }
27
28   public void testSwimlaneAssignLog() {
29     SwimlaneAssignLog SwimlaneAssignLog = new SwimlaneAssignLog(swimlaneInstance,"me", "toyou");
30     jbpmSession.getSession().save(SwimlaneAssignLog);
31     
32     newTransaction();
33     
34     SwimlaneAssignLog = (SwimlaneAssignLog) jbpmSession.getSession().load(SwimlaneAssignLog.class, new Long JavaDoc(SwimlaneAssignLog.getId()));
35     assertNotNull(SwimlaneAssignLog);
36     assertNotNull(SwimlaneAssignLog.getSwimlaneInstance());
37     assertEquals("me", (SwimlaneAssignLog.getSwimlaneOldActorId()));
38     assertEquals("toyou", (SwimlaneAssignLog.getSwimlaneNewActorId()));
39   }
40 }
41
Popular Tags