use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionAuthorizationTest method testQueryWithoutAuthorization.
public void testQueryWithoutAuthorization() {
// given user is not authorized to read any decision definition
// when
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByInvalidKey.
@Test
public void queryByInvalidKey() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionKey("invalid");
verifyQueryResults(query, 0);
try {
query.decisionDefinitionKey(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByKeyLike.
@Test
public void queryByKeyLike() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionKeyLike("%o%");
verifyQueryResults(query, 3);
query.decisionDefinitionKeyLike("%z\\_");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByInvalidNResourceNameLike.
@Test
public void queryByInvalidNResourceNameLike() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionResourceNameLike("%invalid%");
verifyQueryResults(query, 0);
try {
query.decisionDefinitionNameLike(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByDecisionRequirementsDefinitionKey.
@Test
public void queryByDecisionRequirementsDefinitionKey() {
testRule.deploy(DRD_DISH_RESOURCE, DRD_SCORE_RESOURCE);
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
verifyQueryResults(query.decisionRequirementsDefinitionKey("non existing"), 0);
verifyQueryResults(query.decisionRequirementsDefinitionKey("dish"), 3);
verifyQueryResults(query.decisionRequirementsDefinitionKey("score"), 2);
}
Aggregations