org.alfresco.repo.action
Class ActionServiceImplTest

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.alfresco.util.BaseSpringTest
                                      extended by org.alfresco.util.BaseAlfrescoSpringTest
                                          extended by org.alfresco.repo.action.ActionServiceImplTest
All Implemented Interfaces:
junit.framework.Test

public class ActionServiceImplTest
extends BaseAlfrescoSpringTest

Action service test


Nested Class Summary
static interface ActionServiceImplTest.AsyncTest
          Async test interface
protected static class ActionServiceImplTest.CancellableSleepAction
           
static class ActionServiceImplTest.SleepActionExecuter
          This class is only intended for use in JUnit tests.
static class ActionServiceImplTest.SleepActionFilter
          This class is only used during JUnit testing.
 
Field Summary
 
Fields inherited from class org.alfresco.util.BaseAlfrescoSpringTest
actionService, authenticationComponent, authenticationService, contentService, nodeService, rootNodeRef, storeRef, transactionService
 
Fields inherited from class org.alfresco.util.BaseSpringTest
sessionFactory
 
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
ActionServiceImplTest()
           
 
Method Summary
static void assertBefore(java.util.Date before, java.util.Date after)
           
protected  Action createFailingMoveAction()
           
protected  Action createFailingSleepAction(java.lang.String id)
           
protected static Action createFailingSleepAction(java.lang.String id, ActionService actionService)
           
protected  Action createWorkingSleepAction()
           
protected  Action createWorkingSleepAction(java.lang.String id)
           
protected static Action createWorkingSleepAction(java.lang.String id, ActionService actionService)
           
 void offtestAsyncLongRunningActionsFilter()
          This test checks that a series of "equivalent" actions submitted for asynchronous execution will be correctly filtered so that no 2 equivalent actions are executed at the same time.
protected  void onSetUpInTransaction()
          On setup in transaction override
static void postAsyncActionTest(TransactionService transactionService, long sleepTime, int maxTries, ActionServiceImplTest.AsyncTest test)
           
 void testActionOrder()
           
 void testActionResult()
          Test the action result parameter
 void testALF5027()
          http://issues.alfresco.com/jira/browse/ALF-5027
 void testAsyncCompositeActionExecute()
          Test async composite action execution
 void testAsyncExecuteAction()
          Test asynchronous execute action
 void testCompensatingAction()
          Test the compensating action
 void testConditionOrder()
           
 void testCreateAction()
          Test createAction
 void testCreateActionCondition()
          Test create action condition
 void testCreateCompositeAction()
          Test createCompositeAction
 void testCreateCompositeActionCondition()
          Test createCompositeAction
 void testEvaluateAction()
          Evaluate action
 void testEvaluateActionCondition()
          Test evaluate action condition
 void testEvaluateCompositeActionConditionWith1SubCondition()
          Test evaluate action condition
 void testEvaluateCompositeActionConditionWith2SubConditions()
          Test evaluate action condition
 void testExecuteAction()
          Test execute action
 void testExecutionTrackingDetails()
          Tests that we can read, save, load etc the various execution related details such as started at, ended at, status and exception
 void testGetActionConditionDefinition()
          Test getActionConditionDefinition
 void testGetActionConditionDefinitions()
          Test getActionConditionDefinitions
 void testGetActionDefinition()
          Test getActionDefinition
 void testGetActionDefinitions()
          Test getActionDefintions
 void testGetAndGetAllWithNoActions()
           
 void testOwningNodeRef()
           
 void testRemove()
          Test remove action
 void testSaveActionNoCondition()
          Test saving an action with no conditions.
 void testSaveActionWithConditions()
          Test saving an action with conditions
 void testSaveCompositeAction()
          Test saving a composite action
 void testSyncFailureBehaviour()
          Test sync failure behaviour
 void xtestAsyncLoadTest()
           
 
Methods inherited from class org.alfresco.util.BaseAlfrescoSpringTest
createNode, onTearDownInTransaction
 
Methods inherited from class org.alfresco.util.BaseSpringTest
flushAndClear, getConfigLocations, getSession, loadContext, setSessionFactory
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpBeforeTransaction, onTearDown, onTearDownAfterTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionServiceImplTest

public ActionServiceImplTest()
Method Detail

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws java.lang.Exception
Description copied from class: BaseAlfrescoSpringTest
On setup in transaction override

Overrides:
onSetUpInTransaction in class BaseAlfrescoSpringTest
Throws:
java.lang.Exception

testGetActionDefinition

public void testGetActionDefinition()
Test getActionDefinition


testGetActionDefinitions

public void testGetActionDefinitions()
Test getActionDefintions


testGetActionConditionDefinition

public void testGetActionConditionDefinition()
Test getActionConditionDefinition


testGetActionConditionDefinitions

public void testGetActionConditionDefinitions()
Test getActionConditionDefinitions


testCreateActionCondition

public void testCreateActionCondition()
Test create action condition


testCreateCompositeActionCondition

public void testCreateCompositeActionCondition()
Test createCompositeAction


testCreateAction

public void testCreateAction()
Test createAction


testCreateCompositeAction

public void testCreateCompositeAction()
Test createCompositeAction


testEvaluateAction

public void testEvaluateAction()
Evaluate action


testEvaluateActionCondition

public void testEvaluateActionCondition()
Test evaluate action condition


testEvaluateCompositeActionConditionWith1SubCondition

public void testEvaluateCompositeActionConditionWith1SubCondition()
Test evaluate action condition


testEvaluateCompositeActionConditionWith2SubConditions

public void testEvaluateCompositeActionConditionWith2SubConditions()
Test evaluate action condition


testExecuteAction

public void testExecuteAction()
Test execute action


testGetAndGetAllWithNoActions

public void testGetAndGetAllWithNoActions()

testSaveActionNoCondition

public void testSaveActionNoCondition()
Test saving an action with no conditions. Includes testing storage and retrieval of compensating actions.


testOwningNodeRef

public void testOwningNodeRef()

testSaveActionWithConditions

public void testSaveActionWithConditions()
Test saving an action with conditions


testSaveCompositeAction

public void testSaveCompositeAction()
Test saving a composite action


testRemove

public void testRemove()
Test remove action


testConditionOrder

public void testConditionOrder()

testActionOrder

public void testActionOrder()

testActionResult

public void testActionResult()
Test the action result parameter


offtestAsyncLongRunningActionsFilter

public void offtestAsyncLongRunningActionsFilter()
This test checks that a series of "equivalent" actions submitted for asynchronous execution will be correctly filtered so that no 2 equivalent actions are executed at the same time.


testAsyncExecuteAction

public void testAsyncExecuteAction()
Test asynchronous execute action


testAsyncCompositeActionExecute

public void testAsyncCompositeActionExecute()
Test async composite action execution


xtestAsyncLoadTest

public void xtestAsyncLoadTest()

postAsyncActionTest

public static void postAsyncActionTest(TransactionService transactionService,
                                       long sleepTime,
                                       int maxTries,
                                       ActionServiceImplTest.AsyncTest test)
Parameters:
sleepTime -
maxTries -
test -
context -

testSyncFailureBehaviour

public void testSyncFailureBehaviour()
Test sync failure behaviour


testCompensatingAction

public void testCompensatingAction()
Test the compensating action


testALF5027

public void testALF5027()
                 throws java.lang.Exception
http://issues.alfresco.com/jira/browse/ALF-5027

Throws:
java.lang.Exception

testExecutionTrackingDetails

public void testExecutionTrackingDetails()
Tests that we can read, save, load etc the various execution related details such as started at, ended at, status and exception


createFailingMoveAction

protected Action createFailingMoveAction()

createFailingSleepAction

protected Action createFailingSleepAction(java.lang.String id)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

createFailingSleepAction

protected static Action createFailingSleepAction(java.lang.String id,
                                                 ActionService actionService)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

createWorkingSleepAction

protected Action createWorkingSleepAction()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

createWorkingSleepAction

protected Action createWorkingSleepAction(java.lang.String id)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

createWorkingSleepAction

protected static Action createWorkingSleepAction(java.lang.String id,
                                                 ActionService actionService)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

assertBefore

public static void assertBefore(java.util.Date before,
                                java.util.Date after)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.