use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByName.
public void testQueryByName() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionName("Two");
verifyQueryResults(query, 1);
query.caseDefinitionName("One");
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByInvalidVersion.
public void testQueryByInvalidVersion() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionVersion(3);
verifyQueryResults(query, 0);
try {
query.caseDefinitionVersion(-1);
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionVersion(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByCategory.
public void testQueryByCategory() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionCategory("Examples");
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByInvalidKey.
public void testQueryByInvalidKey() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionKey("invalid");
verifyQueryResults(query, 0);
try {
query.caseDefinitionKey(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByInvalidResourceNameLike.
public void testQueryByInvalidResourceNameLike() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionResourceNameLike("%invalid%");
verifyQueryResults(query, 0);
try {
query.caseDefinitionNameLike(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
Aggregations