-
-
Save sfss5362/3795255 to your computer and use it in GitHub Desktop.
WorkflowPaymentTestUT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 测试收费/缴费流程 | |
* | |
* @author HenryYan | |
* | |
*/ | |
public class WorkflowPaymentTestUT extends BaseWorkflowTest { | |
private static String businessKey = "1"; | |
private String processDefinitionKey = "payment"; | |
@Before | |
public void setUp() throws Exception { | |
PropertyFileUtil.init(); | |
String filePath = getProcessDefinitionXmlDir() + "erp/payment/payment.bpmn20.xml"; | |
deployprocessDefinition(filePath); | |
} | |
@Test | |
public void verifyProcess() { | |
List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery() | |
.processDefinitionKey(processDefinitionKey).list(); | |
Assert.assertEquals(1, list.size()); | |
} | |
/** | |
* 使用垫付方式启动流程 | |
*/ | |
@Test | |
public void startWithPayStyleOfAdvance() { | |
Map<String, Object> variables = WorkflowUtils.createEmptyVariables(); | |
variables.put("paymentMode", "advance"); | |
setPaymentVars(variables); | |
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey, businessKey, variables); | |
Assert.assertNotNull(processInstance); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment