use of org.activiti.engine.repository.DeploymentQuery in project Activiti by Activiti.
the class SpringAutoDeployTest method testNoRedeploymentForSpringContainerRestart.
public void testNoRedeploymentForSpringContainerRestart() throws Exception {
createAppContext(CTX_PATH);
DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery();
assertThat(deploymentQuery.count()).isEqualTo(1);
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
assertThat(processDefinitionQuery.count()).isEqualTo(3);
// Creating a new app context with same resources doesn't lead to more
// deployments
new ClassPathXmlApplicationContext(CTX_NO_DROP_PATH);
assertThat(deploymentQuery.count()).isEqualTo(1);
assertThat(processDefinitionQuery.count()).isEqualTo(3);
}
use of org.activiti.engine.repository.DeploymentQuery in project Activiti by Activiti.
the class DeploymentQueryEscapeClauseTest method testQueryByProcessDefinitionKeyLike.
public void testQueryByProcessDefinitionKeyLike() {
DeploymentQuery query = repositoryService.createDeploymentQuery().processDefinitionKeyLike("%\\_%");
assertThat(query.list()).hasSize(1);
assertThat(query.count()).isEqualTo(1);
}
use of org.activiti.engine.repository.DeploymentQuery in project Activiti by Activiti.
the class DeploymentQueryEscapeClauseTest method testQueryByNameLike.
public void testQueryByNameLike() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("%\\%%");
assertThat(query.singleResult().getName()).isEqualTo("one%");
assertThat(query.list()).hasSize(1);
assertThat(query.count()).isEqualTo(1);
query = repositoryService.createDeploymentQuery().deploymentNameLike("%\\_%");
assertThat(query.singleResult().getName()).isEqualTo("two_");
assertThat(query.list()).hasSize(1);
assertThat(query.count()).isEqualTo(1);
}
Aggregations