org.jbpm.test
Class AbstractTransactionalSpringJbpmTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by org.jbpm.test.AbstractTransactionalSpringJbpmTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractTransactionalSpringJbpmTestCase
extends org.springframework.test.AbstractTransactionalDataSourceSpringContextTests

Convenient superclass for tests of processes that should occur in a transaction, but normally will roll the transaction back on the completion of each test. It contains some convenience methods: - Deploying XML - Deploying from classpath Exposes all relevant services as protected fields.

Author:
Andries Inze
See Also:
AbstractTransactionalDataSourceSpringContextTests

Field Summary
protected  org.jbpm.api.ExecutionService executionService
           
protected  org.jbpm.api.HistoryService historyService
           
protected  org.jbpm.api.IdentityService identityService
           
protected  org.jbpm.api.ManagementService managementService
           
protected  org.jbpm.api.ProcessEngine processEngine
           
protected  org.jbpm.api.RepositoryService repositoryService
           
protected  org.jbpm.api.TaskService taskService
           
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
AbstractTransactionalSpringJbpmTestCase()
          Creates a new instance.
 
Method Summary
 java.lang.String deployJpdlFromClasspath(java.lang.String jpdlXmlString)
          deploys the process.
 java.lang.String deployJpdlXmlString(java.lang.String jpdlXmlString)
          deploys the process.
protected  java.lang.String getJbpmConfigurationName()
          Default configuration name.
protected  void injectDependencies()
          {@inheritDoc)
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, onSetUp, onSetUpBeforeTransaction, onSetUpInTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, 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
 

Field Detail

processEngine

protected org.jbpm.api.ProcessEngine processEngine

repositoryService

protected org.jbpm.api.RepositoryService repositoryService

executionService

protected org.jbpm.api.ExecutionService executionService

managementService

protected org.jbpm.api.ManagementService managementService

taskService

protected org.jbpm.api.TaskService taskService

historyService

protected org.jbpm.api.HistoryService historyService

identityService

protected org.jbpm.api.IdentityService identityService
Constructor Detail

AbstractTransactionalSpringJbpmTestCase

public AbstractTransactionalSpringJbpmTestCase()
Creates a new instance. Will require a transactionManager.

Method Detail

injectDependencies

protected void injectDependencies()
                           throws java.lang.Exception
{@inheritDoc)

Overrides:
injectDependencies in class org.springframework.test.AbstractDependencyInjectionSpringContextTests
Throws:
java.lang.Exception

getJbpmConfigurationName

protected java.lang.String getJbpmConfigurationName()
Default configuration name. Overwrite this if the jbpm configuration is named different.

Returns:
the jbpmConfigurationName

deployJpdlXmlString

public java.lang.String deployJpdlXmlString(java.lang.String jpdlXmlString)
deploys the process.


deployJpdlFromClasspath

public java.lang.String deployJpdlFromClasspath(java.lang.String jpdlXmlString)
deploys the process.



Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.