TSK-605: Improved mapper test coverage for classification attributes
This commit is contained in:
parent
43d25e0496
commit
aadc31beff
|
@ -148,13 +148,13 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery nameLike(String... nameLike) {
|
||||
this.nameLike = nameLike;
|
||||
this.nameLike = toUpperCopy(nameLike);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassificationQuery descriptionLike(String description) {
|
||||
this.descriptionLike = description;
|
||||
this.descriptionLike = description.toUpperCase();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery serviceLevelLike(String... serviceLevelLike) {
|
||||
this.serviceLevelLike = serviceLevelLike;
|
||||
this.serviceLevelLike = toUpperCopy(serviceLevelLike);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery applicationEntryPointLike(String... applicationEntryPointLike) {
|
||||
this.applicationEntryPointLike = applicationEntryPointLike;
|
||||
this.applicationEntryPointLike = toUpperCopy(applicationEntryPointLike);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom1Like(String... custom1Like) {
|
||||
this.custom1Like = custom1Like;
|
||||
this.custom1Like = toUpperCopy(custom1Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom2Like(String... custom2Like) {
|
||||
this.custom2Like = custom2Like;
|
||||
this.custom2Like = toUpperCopy(custom2Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom3Like(String... custom3Like) {
|
||||
this.custom3Like = custom3Like;
|
||||
this.custom3Like = toUpperCopy(custom3Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom4Like(String... custom4Like) {
|
||||
this.custom4Like = custom4Like;
|
||||
this.custom4Like = toUpperCopy(custom4Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom5Like(String... custom5Like) {
|
||||
this.custom5Like = custom5Like;
|
||||
this.custom5Like = toUpperCopy(custom5Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom6Like(String... custom6Like) {
|
||||
this.custom6Like = custom6Like;
|
||||
this.custom6Like = toUpperCopy(custom6Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom7Like(String... custom7Like) {
|
||||
this.custom7Like = custom7Like;
|
||||
this.custom7Like = toUpperCopy(custom7Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
|
||||
@Override
|
||||
public ClassificationQuery custom8Like(String... custom8Like) {
|
||||
this.custom8Like = custom8Like;
|
||||
this.custom8Like = toUpperCopy(custom8Like);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -614,6 +614,14 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
return columnName;
|
||||
}
|
||||
|
||||
private String[] toUpperCopy(String... source) {
|
||||
String[] target = new String[source.length];
|
||||
for (int i = 0; i < source.length; i++) {
|
||||
target[i] = source[i].toUpperCase();
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
|
|
@ -284,29 +284,29 @@ public interface QueryMapper {
|
|||
+ "<if test='createdIn !=null'> AND ( <foreach item='item' collection='createdIn' separator=' OR ' > ( <if test='item.begin!=null'> CREATED >= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> CREATED <=#{item.end} </if>)</foreach>)</if> "
|
||||
+ "<if test='modifiedIn !=null'> AND ( <foreach item='item' collection='modifiedIn' separator=' OR ' > ( <if test='item.begin!=null'> MODIFIED >= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> MODIFIED <=#{item.end} </if>)</foreach>)</if> "
|
||||
+ "<if test='nameIn != null'>AND NAME IN(<foreach item='item' collection='nameIn' separator=',' >#{item}</foreach>)</if> "
|
||||
+ "<if test='nameLike != null'>AND (<foreach item='item' collection='nameLike' separator=' OR '>NAME LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='descriptionLike != null'>AND DESCRIPTION like #{descriptionLike}</if> "
|
||||
+ "<if test='nameLike != null'>AND (<foreach item='item' collection='nameLike' separator=' OR '>UPPER(NAME) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='descriptionLike != null'>AND UPPER(DESCRIPTION) like #{descriptionLike}</if> "
|
||||
+ "<if test='priority != null'>AND PRIORITY IN(<foreach item='item' collection='priority' separator=',' >#{item}</foreach>)</if> "
|
||||
+ "<if test='serviceLevelIn != null'>AND SERVICE_LEVEL IN(<foreach item='item' collection='serviceLevelIn' separator=',' >#{item}</foreach>)</if> "
|
||||
+ "<if test='serviceLevelLike != null'>AND (<foreach item='item' collection='serviceLevelLike' separator=' OR ' >SERVICE_LEVEL LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='applicationEntryPointIn != null'>AND APPLICATION_ENTRY_POINT IN(<foreach item='item' collection='applicationEntryPoint' separator=',' >#{item}</foreach>)</if> "
|
||||
+ "<if test='applicationEntryPointLike != null'>AND (<foreach item='item' collection='applicationEntryPointLike' separator=' OR ' >APPLICATION_ENTRY_POINT LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='serviceLevelLike != null'>AND (<foreach item='item' collection='serviceLevelLike' separator=' OR ' >UPPER(SERVICE_LEVEL) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='applicationEntryPointIn != null'>AND APPLICATION_ENTRY_POINT IN(<foreach item='item' collection='applicationEntryPointIn' separator=',' >#{item}</foreach>)</if> "
|
||||
+ "<if test='applicationEntryPointLike != null'>AND (<foreach item='item' collection='applicationEntryPointLike' separator=' OR ' >UPPER(APPLICATION_ENTRY_POINT) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom1In != null'>AND CUSTOM_1 IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' >CUSTOM_1 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' > UPPER(CUSTOM_1) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom2In != null'>AND CUSTOM_2 IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' > CUSTOM_2 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' > UPPER(CUSTOM_2) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom3In != null'>AND CUSTOM_3 IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' > CUSTOM_3 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' > UPPER(CUSTOM_3) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom4In != null'>AND CUSTOM_4 IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' > CUSTOM_4 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' > UPPER(CUSTOM_4) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom5In != null'>AND CUSTOM_5 IN(<foreach item='item' collection='custom5In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom5Like != null'>AND (<foreach item='item' collection='custom5Like' separator=' OR ' > CUSTOM_5 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom5Like != null'>AND (<foreach item='item' collection='custom5Like' separator=' OR ' > UPPER(CUSTOM_5) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom6In != null'>AND CUSTOM_6 IN(<foreach item='item' collection='custom6In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom6Like != null'>AND (<foreach item='item' collection='custom6Like' separator=' OR ' > CUSTOM_6 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom6Like != null'>AND (<foreach item='item' collection='custom6Like' separator=' OR ' > UPPER(CUSTOM_6) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom7In != null'>AND CUSTOM_7 IN(<foreach item='item' collection='custom7In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom7Like != null'>AND (<foreach item='item' collection='custom7Like' separator=' OR ' > CUSTOM_7 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom7Like != null'>AND (<foreach item='item' collection='custom7Like' separator=' OR ' > UPPER(CUSTOM_7) LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom8In != null'>AND CUSTOM_8 IN(<foreach item='item' collection='custom8In' separator=',' >#{item}</foreach>) </if> "
|
||||
+ "<if test='custom8Like != null'>AND (<foreach item='item' collection='custom8Like' separator=' OR ' > CUSTOM_8 LIKE #{item}</foreach>)</if> "
|
||||
+ "<if test='custom8Like != null'>AND (<foreach item='item' collection='custom8Like' separator=' OR ' > UPPER(CUSTOM_8) LIKE #{item}</foreach>)</if> "
|
||||
+ "</where>"
|
||||
+ "<if test='!orderBy.isEmpty()'>ORDER BY <foreach item='item' collection='orderBy' separator=',' >${item}</foreach></if> "
|
||||
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
|
||||
|
|
|
@ -7,7 +7,6 @@ import static org.junit.Assert.fail;
|
|||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import pro.taskana.Classification;
|
||||
import pro.taskana.ClassificationService;
|
||||
|
@ -44,7 +43,7 @@ public class GetClassificationAccTest extends AbstractAccTest {
|
|||
assertEquals("T-GUK Honorarrechnung erstellen", classification.getName());
|
||||
assertEquals(2, classification.getPriority());
|
||||
assertEquals("P2D", classification.getServiceLevel());
|
||||
assertEquals("", classification.getApplicationEntryPoint());
|
||||
assertEquals("point0815", classification.getApplicationEntryPoint());
|
||||
assertEquals("VNR", classification.getCustom1());
|
||||
assertEquals("custom2", classification.getCustom2());
|
||||
assertEquals("custom3", classification.getCustom3());
|
||||
|
@ -70,7 +69,7 @@ public class GetClassificationAccTest extends AbstractAccTest {
|
|||
assertEquals("T-GUK Honorarrechnung erstellen", classification.getName());
|
||||
assertEquals(2, classification.getPriority());
|
||||
assertEquals("P2D", classification.getServiceLevel());
|
||||
assertEquals("", classification.getApplicationEntryPoint());
|
||||
assertEquals("point0815", classification.getApplicationEntryPoint());
|
||||
assertEquals("VNR", classification.getCustom1());
|
||||
assertEquals("custom2", classification.getCustom2());
|
||||
assertEquals("custom3", classification.getCustom3());
|
||||
|
|
|
@ -14,6 +14,7 @@ import acceptance.AbstractAccTest;
|
|||
import pro.taskana.ClassificationService;
|
||||
import pro.taskana.ClassificationSummary;
|
||||
import pro.taskana.TimeInterval;
|
||||
import pro.taskana.BaseQuery.SortDirection;
|
||||
import pro.taskana.exceptions.ClassificationNotFoundException;
|
||||
import pro.taskana.exceptions.ConcurrencyException;
|
||||
import pro.taskana.exceptions.InvalidArgumentException;
|
||||
|
@ -27,6 +28,9 @@ import pro.taskana.security.WithAccessId;
|
|||
@RunWith(JAASRunner.class)
|
||||
public class QueryClassificationAccTest extends AbstractAccTest {
|
||||
|
||||
private static SortDirection asc = SortDirection.ASCENDING;
|
||||
private static SortDirection desc = SortDirection.DESCENDING;
|
||||
|
||||
public QueryClassificationAccTest() {
|
||||
super();
|
||||
}
|
||||
|
@ -254,4 +258,364 @@ public class QueryClassificationAccTest extends AbstractAccTest {
|
|||
assertEquals(1, list.size());
|
||||
assertEquals(clId, list.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForNameLike() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.nameLike("Dynamik%")
|
||||
.list();
|
||||
assertEquals(8, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForNameIn() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.nameIn("Widerruf", "OLD-Leistungsfall")
|
||||
.list();
|
||||
assertEquals(5, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForDescriptionLike() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.descriptionLike("Widerruf%")
|
||||
.list();
|
||||
assertEquals(8, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForServiceLevelIn() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.serviceLevelIn("P2D")
|
||||
.list();
|
||||
assertEquals(5, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForServiceLevelLike() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.serviceLevelLike("PT%")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForApplicationEntryPointIn() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.applicationEntryPointIn("specialPoint", "point0815")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForApplicationEntryPointLike() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.applicationEntryPointLike("point%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom1In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom1In("VNR,RVNR,KOLVNR, ANR", "VNR")
|
||||
.list();
|
||||
assertEquals(13, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom2In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom2In("CUSTOM2", "custom2")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom3In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom3In("Custom3", "custom3")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom4In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom4In("custom4")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom5In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom5In("custom5")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom6In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom6In("custom6")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom7In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom7In("custom7", "custom_7")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom8In() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom8In("custom_8", "custom8")
|
||||
.list();
|
||||
assertEquals(2, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom3Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom3Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom4Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom4Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom5Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom5Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom6Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom6Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom7Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom7Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForCustom8Like() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.custom8Like("cus%")
|
||||
.list();
|
||||
assertEquals(3, results.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByKeyAsc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByKey(asc)
|
||||
.list();
|
||||
assertEquals("A12", results.get(0).getKey());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByParentIdDesc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByParentId(desc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000015", results.get(0).getParentId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByParentKeyDesc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByParentId(desc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000015", results.get(0).getParentId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCategoryDesc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCategory(desc)
|
||||
.list();
|
||||
assertEquals("MANUAL", results.get(0).getCategory());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByDomainAsc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByDomain(asc)
|
||||
.list();
|
||||
assertEquals("", results.get(0).getDomain());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByPriorityDesc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByPriority(desc)
|
||||
.list();
|
||||
assertEquals(999, results.get(0).getPriority());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByNameAsc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("Beratungsprotokoll", results.get(0).getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByServiceLevelDesc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByServiceLevel(desc)
|
||||
.list();
|
||||
assertEquals("PT7H", results.get(0).getServiceLevel());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByApplicationEntryPointAsc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByApplicationEntryPoint(asc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000007", results.get(results.size() - 5).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByParentKeyAsc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByParentKey(asc)
|
||||
.list();
|
||||
assertEquals("CLI:000000000000000000000000000000000001", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom1Desc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom1(desc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:000000000000000000000000000000000002", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom2Asc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom2(asc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:000000000000000000000000000000000002", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom3Desc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom3(desc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000014", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom4Asc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom4(asc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000010", results.get(results.size() - 4).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom5Desc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom5(desc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000011", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom6Asc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom6(asc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000010", results.get(results.size() - 3).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom7Desc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom7(desc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000011", results.get(0).getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testQueryForOrderByCustom8Asc() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
List<ClassificationSummary> results = classificationService.createClassificationQuery()
|
||||
.orderByCustom8(asc)
|
||||
.orderByName(asc)
|
||||
.list();
|
||||
assertEquals("CLI:100000000000000000000000000000000010", results.get(results.size() - 3).getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,20 +21,20 @@ INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000
|
|||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000004', 'L11010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 1, 'P14D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000005', 'L110102', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P15D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000006', 'L110105', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P16D', '', 'VNR,RVNR,KOLVNR', 'TEXT_2', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', 'point0815', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L12010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', 'custom2', 'custom3', 'custom4', 'custom5', 'custom6', 'custom7', 'custom8');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', 'cust2', 'cust3', 'cust4', 'cust5', 'cust6', 'cust7', 'cust8');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', 'point0815', 'VNR', 'custom2', 'custom3', 'custom4', 'custom5', 'custom6', 'custom7', 'custom8');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', '', 'EXTERNAL', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', 'VNR', 'VNR', 'VNR', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,KOLVNR,RVNR', 'CUSTOM_2', 'Custom_3', 'custom_4', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', 'z', 'VNR,KOLVNR,RVNR', 'CUSTOM2', 'Custom3', 'custom4', 'custom5', 'custom6', 'custom7', 'custom8');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', 'specialPoint', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:400000000000000000000000000000000017', 'L3060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
|
||||
-- DOMAIN_B CLASSIFICATIONS
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000015', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 22, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', 'point0816', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
|
||||
|
||||
-- WITH PARENT CLASSIFICATIONS (MIXED DOMAIN) ---
|
||||
-- DOMAIN_A
|
||||
|
|
Loading…
Reference in New Issue