org.jbpm.test
Class JbpmTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.jbpm.test.BaseJbpmTestCase
org.jbpm.test.JbpmTestCase
- All Implemented Interfaces:
- junit.framework.Test
public abstract class JbpmTestCase
- extends BaseJbpmTestCase
base class for persistent jBPM tests.
This class exposes a lot of extra convenience methods for testing
process executions.
The ProcessEngine services will be initialized and available as
member fields.
This test assumes that each test will clean the DB itself and that
no data is in the DB tables when the test finishes.
During tearDown, a check will be done if all the DB tables are
empty. If not, that is logged with a F I X M E and the DB tables
are cleaned.
- Author:
- Tom Baeyens, Heiko Braun
|
Method Summary |
void |
assertActiveActivity(java.lang.String activityName,
java.lang.String executionId)
|
static void |
assertContainsTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName)
|
static void |
assertContainsTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName,
java.lang.String assignee)
|
void |
assertExecutionEnded(java.lang.String processInstanceId)
|
void |
assertExecutionInActivity(java.lang.String executionId,
java.lang.String activityName)
|
void |
assertProcessInstanceEnded(org.jbpm.api.ProcessInstance processInstance)
|
void |
assertProcessInstanceEnded(java.lang.String processInstanceId)
|
java.lang.String |
deployJpdlXmlString(java.lang.String jpdlXmlString)
deploys the process, keeps a reference to the deployment and
automatically deletes the deployment in the tearDown |
static org.jbpm.api.task.Task |
getTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName)
|
static org.jbpm.api.task.Task |
getTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName,
java.lang.String assignee)
|
protected void |
initialize()
|
protected void |
registerDeployment(java.lang.String deploymentId)
registered deployments will be deleted in the tearDown |
protected void |
setUp()
|
protected void |
tearDown()
|
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, setName, toString |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
processEngine
protected static org.jbpm.api.ProcessEngine processEngine
repositoryService
protected static org.jbpm.api.RepositoryService repositoryService
executionService
protected static org.jbpm.api.ExecutionService executionService
managementService
protected static org.jbpm.api.ManagementService managementService
taskService
protected static org.jbpm.api.TaskService taskService
historyService
protected static org.jbpm.api.HistoryService historyService
identityService
protected static org.jbpm.api.IdentityService identityService
registeredDeployments
protected java.util.List<java.lang.String> registeredDeployments
- registered deployments. registered deployments will be deleted automatically
in the tearDown. This is a convenience function as each test is expected to clean up the DB.
JbpmTestCase
public JbpmTestCase()
setUp
protected void setUp()
throws java.lang.Exception
- Overrides:
setUp in class BaseJbpmTestCase
- Throws:
java.lang.Exception
initialize
protected void initialize()
tearDown
protected void tearDown()
throws java.lang.Exception
- Overrides:
tearDown in class BaseJbpmTestCase
- Throws:
java.lang.Exception
deployJpdlXmlString
public java.lang.String deployJpdlXmlString(java.lang.String jpdlXmlString)
- deploys the process, keeps a reference to the deployment and
automatically deletes the deployment in the tearDown
registerDeployment
protected void registerDeployment(java.lang.String deploymentId)
- registered deployments will be deleted in the tearDown
assertContainsTask
public static void assertContainsTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName)
assertContainsTask
public static void assertContainsTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName,
java.lang.String assignee)
getTask
public static org.jbpm.api.task.Task getTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName)
getTask
public static org.jbpm.api.task.Task getTask(java.util.List<org.jbpm.api.task.Task> taskList,
java.lang.String taskName,
java.lang.String assignee)
assertExecutionEnded
public void assertExecutionEnded(java.lang.String processInstanceId)
assertProcessInstanceEnded
public void assertProcessInstanceEnded(java.lang.String processInstanceId)
assertProcessInstanceEnded
public void assertProcessInstanceEnded(org.jbpm.api.ProcessInstance processInstance)
assertActiveActivity
public void assertActiveActivity(java.lang.String activityName,
java.lang.String executionId)
assertExecutionInActivity
public void assertExecutionInActivity(java.lang.String executionId,
java.lang.String activityName)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.