Search in sources :

Example 21 with DecisionRequirementsDefinitionQuery

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"));
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) Test(org.junit.Test)

Example 22 with DecisionRequirementsDefinitionQuery

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));
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) Test(org.junit.Test)

Example 23 with DecisionRequirementsDefinitionQuery

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"));
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) Test(org.junit.Test)

Example 24 with DecisionRequirementsDefinitionQuery

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));
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) Test(org.junit.Test)

Example 25 with DecisionRequirementsDefinitionQuery

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));
}
Also used : DecisionRequirementsDefinitionQuery(org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery) Test(org.junit.Test)

Aggregations

DecisionRequirementsDefinitionQuery (org.camunda.bpm.engine.repository.DecisionRequirementsDefinitionQuery)37 Test (org.junit.Test)31 DecisionRequirementsDefinition (org.camunda.bpm.engine.repository.DecisionRequirementsDefinition)9 Deployment (org.camunda.bpm.engine.test.Deployment)4 InputStream (java.io.InputStream)2 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 DecisionRequirementsDefinitionQueryDto (org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionQueryDto)2 ArrayList (java.util.ArrayList)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 DecisionRequirementsDefinitionDto (org.camunda.bpm.engine.rest.dto.repository.DecisionRequirementsDefinitionDto)1