public Builder version(String version) { definition.setVersion(version); return this; }
@Test public void testProcessSummaryMapper_mapProcessSummary() { final ProcessDefinition pd = new ProcessDefinition(); pd.setName("definitionName"); pd.setId("definitionId"); pd.setDynamic(true); pd.setContainerId("containerId"); pd.setVersion("1.0"); pd.setAssociatedEntities(singletonMap("e1", new String[0])); pd.setProcessVariables(singletonMap("initiator", "String")); pd.setReusableSubProcesses(singletonList("processOne")); pd.setServiceTasks(singletonMap("email", "org.jbpm")); pd.setNodes(singletonList(NodeDefinition.builder().id(1l).build())); pd.setTimers(singletonList(TimerDefinition.builder().id(1l).build())); assertProcessSummary(pd, new ProcessSummaryMapper().apply(pd)); }
@Test public void testProcessSummaryMapper_mapProcessSummary() { final ProcessDefinition pd = new ProcessDefinition(); pd.setName("definitionName"); pd.setId("definitionId"); pd.setDynamic(true); pd.setContainerId("containerId"); pd.setVersion("1.0"); pd.setAssociatedEntities(singletonMap("e1", new String[0])); pd.setProcessVariables(singletonMap("initiator", "String")); pd.setReusableSubProcesses(singletonList("processOne")); pd.setServiceTasks(singletonMap("email", "org.jbpm")); pd.setNodes(singletonList(NodeDefinition.builder().id(1l).build())); pd.setTimers(singletonList(TimerDefinition.builder().id(1l).build())); assertProcessSummary(pd, new ProcessSummaryMapper().apply(pd)); }
@Test public void testProcessDefinitionMapper_mapProcessDefinition() { final ProcessDefinition pd = new ProcessDefinition(); pd.setId("org.jbpm.case"); pd.setName("New case"); pd.setContainerId("org.jbpm"); pd.setVersion("1.0"); pd.setPackageName("packageName"); final ProcessDefinitionSummary pds = new ProcessDefinitionMapper().apply(pd); assertCaseDefinition(pd, pds); }
@Test public void testProcessDefinitionMapper_mapProcessDefinition() { final ProcessDefinition pd = new ProcessDefinition(); pd.setId("org.jbpm.case"); pd.setName("New case"); pd.setContainerId("org.jbpm"); pd.setVersion("1.0"); pd.setPackageName("packageName"); final ProcessDefinitionSummary pds = new ProcessDefinitionMapper().apply(pd); assertCaseDefinition(pd, pds); }