use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionRequirementsDefinitionQueryTest method queryByResourceName.
@Test
public void queryByResourceName() {
DecisionRequirementsDefinitionQuery query = repositoryService.createDecisionRequirementsDefinitionQuery();
assertThat(query.decisionRequirementsDefinitionResourceName("notExisting").count(), is(0L));
assertThat(query.decisionRequirementsDefinitionResourceName(DRD_SCORE_RESOURCE).count(), is(1L));
assertThat(query.singleResult().getKey(), is("score"));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionRequirementsDefinitionQueryTest method queryByLatest.
@Test
public void queryByLatest() {
DecisionRequirementsDefinitionQuery query = repositoryService.createDecisionRequirementsDefinitionQuery();
assertThat(query.latestVersion().count(), is(3L));
assertThat(query.decisionRequirementsDefinitionKey("score").latestVersion().count(), is(1L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionRequirementsDefinitionQueryTest method queryByDecisionRequirementsDefinitionIds.
@Test
public void queryByDecisionRequirementsDefinitionIds() {
DecisionRequirementsDefinitionQuery query = repositoryService.createDecisionRequirementsDefinitionQuery();
assertThat(query.decisionRequirementsDefinitionIdIn("not", "existing").count(), is(0L));
assertThat(query.decisionRequirementsDefinitionIdIn(decisionRequirementsDefinitionId, "notExisting").count(), is(1L));
assertThat(query.singleResult().getKey(), is("score"));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionRequirementsDefinitionQueryTest method queryByDecisionRequirementsDefinitionNameLike.
@Test
public void queryByDecisionRequirementsDefinitionNameLike() {
DecisionRequirementsDefinitionQuery query = repositoryService.createDecisionRequirementsDefinitionQuery();
assertThat(query.decisionRequirementsDefinitionNameLike("%notExisting%").count(), is(0L));
assertThat(query.decisionRequirementsDefinitionNameLike("%Sco%").count(), is(1L));
assertThat(query.decisionRequirementsDefinitionNameLike("%ish%").count(), is(2L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionRequirementsDefinitionQueryTest method queryByDecisionRequirementsDefinitionKeyLike.
@Test
public void queryByDecisionRequirementsDefinitionKeyLike() {
DecisionRequirementsDefinitionQuery query = repositoryService.createDecisionRequirementsDefinitionQuery();
assertThat(query.decisionRequirementsDefinitionKeyLike("%notExisting%").count(), is(0L));
assertThat(query.decisionRequirementsDefinitionKeyLike("%sco%").count(), is(1L));
assertThat(query.decisionRequirementsDefinitionKeyLike("%dis%").count(), is(2L));
assertThat(query.decisionRequirementsDefinitionKeyLike("%s%").count(), is(3L));
}
Aggregations