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  ExecutionService executionService
           
protected  HistoryService historyService
           
protected  IdentityService identityService
           
protected  ManagementService managementService
           
protected  ProcessEngine processEngine
           
protected  RepositoryService repositoryService
           
protected  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 getConfigPath()
          By default, the applicationContext.xml file in the same package as the test class is used to initialize the Spring container.
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, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processEngine

protected ProcessEngine processEngine

repositoryService

protected RepositoryService repositoryService

executionService

protected ExecutionService executionService

managementService

protected ManagementService managementService

taskService

protected TaskService taskService

historyService

protected HistoryService historyService

identityService

protected 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

getConfigPath

protected java.lang.String getConfigPath()
By default, the applicationContext.xml file in the same package as the test class is used to initialize the Spring container. Override this method if you don't need this default behaviour.

Overrides:
getConfigPath in class org.springframework.test.AbstractSingleSpringContextTests

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 © 2010 JBoss Community. All Rights Reserved.