Class WorkflowCompatibleTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.servicelayer.ServicelayerTransactionalTest
-
- de.hybris.platform.workflow.integration.WorkflowCompatibleTest
-
- All Implemented Interfaces:
JaloSessionHolder
@DemoTest public class WorkflowCompatibleTest extends ServicelayerTransactionalTest
Test for extension Workflow.
-
-
Field Summary
Fields Modifier and Type Field Description protected CatalogVersionServicecatalogVersionServiceprotected ModelServicemodelServiceprotected TypeServicetypeServiceprotected UserServiceuserServiceprotected WorkflowActionServiceworkflowActionServiceprotected WorkflowProcessingServiceworkflowProcessingServiceprotected WorkflowServiceworkflowService-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description WorkflowCompatibleTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToPredecessors(WorkflowActionTemplateModel source, WorkflowActionTemplateModel target)protected voidclearCache()protected UserModelcreateUser(java.lang.String userName)protected WorkflowActionTemplateModelcreateWorkflowActionTemplate(UserModel user, java.lang.String code, WorkflowTemplateModel workflow)Creates new action template.protected WorkflowTemplateModelcreateWorkflowTemplate(UserModel user)Creates a workflow template with given user assigned.protected WorkflowTemplateModelcreateWorkflowTemplate(UserModel owner, java.lang.String code, java.lang.String desc)Creates new workflow template using given user, code, and description.protected WorkflowActionModelgetAction(java.lang.String code)Gets the action with given code from test workflow instance.protected WorkflowActionTemplateModelgetActionTemplate(java.lang.String code)Gets the action template with given code from test workflow template.voidsetUp()voidtestAssignedUserCheck()voidtestAttachments()Creates some attachments and assigns them to the test workflow.voidtestWorkflowCompleteChain()Completes the actions of the test workflow and checks the action status.voidtestWorkflowCompleteReject()Rejects action 3 of test workflow and checks action status.voidtestWorkflowCreate()Checks if actions of test workflow has correct status.voidtestWorkflowCreateDisableActivate()Disable actions 1 and 2 of test workflow and checks the status of the workflow actions.-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Field Detail
-
workflowService
protected WorkflowService workflowService
-
modelService
protected ModelService modelService
-
userService
protected UserService userService
-
typeService
protected TypeService typeService
-
catalogVersionService
protected CatalogVersionService catalogVersionService
-
workflowActionService
protected WorkflowActionService workflowActionService
-
workflowProcessingService
protected WorkflowProcessingService workflowProcessingService
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
createUser
protected UserModel createUser(java.lang.String userName)
-
testWorkflowCreate
public void testWorkflowCreate()
Checks if actions of test workflow has correct status.
-
testWorkflowCreateDisableActivate
public void testWorkflowCreateDisableActivate()
Disable actions 1 and 2 of test workflow and checks the status of the workflow actions.
-
testWorkflowCompleteChain
public void testWorkflowCompleteChain()
Completes the actions of the test workflow and checks the action status.
-
testWorkflowCompleteReject
public void testWorkflowCompleteReject()
Rejects action 3 of test workflow and checks action status.
-
testAttachments
public void testAttachments()
Creates some attachments and assigns them to the test workflow.
-
clearCache
protected void clearCache()
-
testAssignedUserCheck
public void testAssignedUserCheck()
-
createWorkflowTemplate
protected WorkflowTemplateModel createWorkflowTemplate(UserModel user)
Creates a workflow template with given user assigned.Action1 < -Action3
Action2 < -Action3
Action3 < -Action4
Action3 < -Action5
- Parameters:
user- user instance to use for template- Returns:
- new created template instance
-
addToPredecessors
public void addToPredecessors(WorkflowActionTemplateModel source, WorkflowActionTemplateModel target)
-
createWorkflowTemplate
protected WorkflowTemplateModel createWorkflowTemplate(UserModel owner, java.lang.String code, java.lang.String desc)
Creates new workflow template using given user, code, and description.- Parameters:
owner- user assigned to new templatecode- code of new templatedesc- description assigned to template- Returns:
- created template
-
createWorkflowActionTemplate
protected WorkflowActionTemplateModel createWorkflowActionTemplate(UserModel user, java.lang.String code, WorkflowTemplateModel workflow)
Creates new action template.- Parameters:
user- user assigned to templatecode- code of templateworkflow- workflow assigned to action template- Returns:
- created action template
-
getAction
protected WorkflowActionModel getAction(java.lang.String code)
Gets the action with given code from test workflow instance.- Parameters:
code- code of needed action- Returns:
- action of test workflow with given code
-
getActionTemplate
protected WorkflowActionTemplateModel getActionTemplate(java.lang.String code)
Gets the action template with given code from test workflow template.- Parameters:
code- code of needed action- Returns:
- action template of test workflow template with given code
-
-