use of org.activiti.engine.repository.ModelQuery in project Activiti by Activiti.
the class ModelQueryTest method testQueryByVersion.
public void testQueryByVersion() {
ModelQuery query = repositoryService.createModelQuery().modelVersion(1);
assertThat(query.list()).hasSize(1);
assertThat(query.count()).isEqualTo(1);
}
use of org.activiti.engine.repository.ModelQuery in project Activiti by Activiti.
the class ModelQueryTest method testQueryByInvalidCategory.
public void testQueryByInvalidCategory() {
ModelQuery query = repositoryService.createModelQuery().modelCategory("invalid");
assertThat(query.singleResult()).isNull();
assertThat(query.list()).hasSize(0);
assertThat(query.count()).isEqualTo(0);
}
use of org.activiti.engine.repository.ModelQuery in project Activiti by Activiti.
the class ModelQueryTest method testQueryNoCriteria.
public void testQueryNoCriteria() {
ModelQuery query = repositoryService.createModelQuery();
assertThat(query.list()).hasSize(1);
assertThat(query.count()).isEqualTo(1);
}
use of org.activiti.engine.repository.ModelQuery in project Activiti by Activiti.
the class ModelQueryTest method testQueryByInvalidCategoryLike.
public void testQueryByInvalidCategoryLike() {
ModelQuery query = repositoryService.createModelQuery().modelCategoryLike("%invalid%");
assertThat(query.singleResult()).isNull();
assertThat(query.list()).hasSize(0);
assertThat(query.count()).isEqualTo(0);
}
use of org.activiti.engine.repository.ModelQuery in project Activiti by Activiti.
the class ModelQueryTest method testNotDeployed.
public void testNotDeployed() {
ModelQuery query = repositoryService.createModelQuery().notDeployed();
assertThat(query.count()).isEqualTo(1);
assertThat(query.list()).hasSize(1);
}
Aggregations