1 package org.jbpm.graph.log; 2 3 import org.jbpm.db.AbstractDbTestCase; 4 import org.jbpm.graph.def.Node; 5 import org.jbpm.graph.def.Transition; 6 7 public class TransitionLogDbTest extends AbstractDbTestCase { 8 9 public void testTransitionLogTransition() { 10 Transition transition = new Transition(); 11 jbpmSession.getSession().save(transition); 12 13 TransitionLog transitionLog = new TransitionLog(transition, null); 14 transitionLog = (TransitionLog) saveAndReload(transitionLog); 15 assertNotNull(transitionLog.getTransition()); 16 } 17 18 public void testTransitionLogSourceNode() { 19 Node sourceNode = new Node(); 20 jbpmSession.getSession().save(sourceNode); 21 22 TransitionLog transitionLog = new TransitionLog(null, sourceNode); 23 transitionLog = (TransitionLog) saveAndReload(transitionLog); 24 assertNotNull(transitionLog.getSourceNode()); 25 } 26 27 public void testTransitionLogDestinationNode() { 28 Node destinationNode = new Node(); 29 jbpmSession.getSession().save(destinationNode); 30 31 TransitionLog transitionLog = new TransitionLog(null, null); 32 transitionLog.setDestinationNode(destinationNode); 33 transitionLog = (TransitionLog) saveAndReload(transitionLog); 34 assertNotNull(transitionLog.getDestinationNode()); 35 } 36 37 } 38 | Popular Tags |