use of org.activiti.api.runtime.shared.query.Pageable in project Activiti by Activiti.
the class ProcessRuntimeIT method should_OnlyProcessDefinitionsFromLatestVersionRetrieved.
@Test
public void should_OnlyProcessDefinitionsFromLatestVersionRetrieved() {
Deployment deployment = processRuntime.selectLatestDeployment();
Page<ProcessDefinition> processDefinitionPage = processRuntime.processDefinitions(PAGEABLE);
assertThat(processDefinitionPage.getContent().stream().filter(c -> c.getKey().equals(SUPER_PROCESS))).extracting(ProcessDefinition::getAppVersion).containsOnly(deployment.getVersion().toString());
}
use of org.activiti.api.runtime.shared.query.Pageable in project Activiti by Activiti.
the class ProcessRuntimeIT method should_processDefinitionAlwaysHaveAppVersion.
@Test
public void should_processDefinitionAlwaysHaveAppVersion() {
Page<ProcessDefinition> processDefinitionPage = processRuntime.processDefinitions(PAGEABLE);
assertThat(processDefinitionPage.getContent()).isNotEmpty();
List<ProcessDefinition> processDefinitions = processDefinitionPage.getContent().stream().filter(c -> c.getKey().equals(SUPER_PROCESS)).collect(Collectors.toList());
assertThat(processDefinitions).hasSize(1);
ProcessDefinition result = processDefinitions.get(0);
assertThat(result.getAppVersion()).isEqualTo("1");
}
Aggregations