use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentQueryTest method testQueryByDeploymentId.
public void testQueryByDeploymentId() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId(deploymentOneId);
assertNotNull(query.singleResult());
assertEquals(1, query.list().size());
assertEquals(1, query.count());
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentQueryTest method testQueryByNameLike.
public void testQueryByNameLike() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("%camunda%");
assertEquals(2, query.list().size());
assertEquals(2, query.count());
query = repositoryService.createDeploymentQuery().deploymentNameLike("%two\\_%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("org/camunda/bpm/engine/test/repository/two_.bpmn20.xml", query.singleResult().getName());
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentQueryTest method testQueryByName.
public void testQueryByName() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentName("org/camunda/bpm/engine/test/repository/two_.bpmn20.xml");
assertNotNull(query.singleResult());
assertEquals(1, query.list().size());
assertEquals(1, query.count());
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentQueryTest method testQueryBySource.
public void testQueryBySource() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentSource(ProcessApplicationDeployment.PROCESS_APPLICATION_DEPLOYMENT_SOURCE);
assertEquals(1, query.list().size());
assertEquals(1, query.count());
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentQueryTest method testQueryByInvalidNameLike.
public void testQueryByInvalidNameLike() {
DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("invalid");
assertNull(query.singleResult());
assertEquals(0, query.list().size());
assertEquals(0, query.count());
try {
repositoryService.createDeploymentQuery().deploymentNameLike(null);
fail();
} catch (ProcessEngineException e) {
}
}
Aggregations