|
|
|
@ -859,28 +859,6 @@ public class ProcessDefinitionServiceTest {
|
|
|
|
|
Assert.assertEquals(2, newName3.split(Constants.IMPORT_SUFFIX).length); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testViewVariables() { |
|
|
|
|
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); |
|
|
|
|
|
|
|
|
|
Project project = getProject(projectCode); |
|
|
|
|
|
|
|
|
|
ProcessDefinition processDefinition = getProcessDefinition(); |
|
|
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); |
|
|
|
|
|
|
|
|
|
// project check auth fail
|
|
|
|
|
Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) |
|
|
|
|
.thenReturn(result); |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = |
|
|
|
|
processDefinitionService.viewVariables(user, processDefinition.getProjectCode(), |
|
|
|
|
processDefinition.getCode()); |
|
|
|
|
|
|
|
|
|
Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* get mock processDefinition |
|
|
|
|
* |
|
|
|
|