use of org.camunda.bpm.engine.exception.NotValidException 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.exception.NotValidException 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
}
}
use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testInvalidUsageOfLatest.
public void testInvalidUsageOfLatest() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
try {
query.caseDefinitionId("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionName("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionNameLike("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionVersion(1).latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.deploymentId("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByInvalidName.
public void testQueryByInvalidName() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionName("invalid");
verifyQueryResults(query, 0);
try {
query.caseDefinitionName(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByInvalidCategory.
@Test
public void queryByInvalidCategory() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionCategory("invalid");
verifyQueryResults(query, 0);
try {
query.decisionDefinitionCategory(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
Aggregations