KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > graph > node > StartStateDbTest


1 package org.jbpm.graph.node;
2
3 import org.jbpm.db.AbstractDbTestCase;
4 import org.jbpm.graph.def.ProcessDefinition;
5
6 public class StartStateDbTest extends AbstractDbTestCase {
7
8   public void testStartState() {
9     ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
10       "<process-definition>" +
11       " <start-state name='start' />" +
12       "</process-definition>");
13   
14     processDefinition = saveAndReload(processDefinition);
15   
16     StartState startState = (StartState) processDefinition.getNode("start");
17     assertEquals("start", startState.getName());
18     assertSame(startState, processDefinition.getStartState());
19   }
20
21 }
22
Popular Tags