TSK-613: Improved workbasket query test coverage

This commit is contained in:
julian.schallenmueller 2018-06-29 09:25:39 +02:00 committed by Holger Hagen
parent f0137f66b8
commit 4c6c3f30ad
4 changed files with 304 additions and 61 deletions

View File

@ -387,21 +387,21 @@ public interface QueryMapper {
+ "<if test='createdIn !=null'> AND ( <foreach item='item' collection='createdIn' separator=' OR ' > ( <if test='item.begin!=null'> w.CREATED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.CREATED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='modifiedIn !=null'> AND ( <foreach item='item' collection='modifiedIn' separator=' OR ' > ( <if test='item.begin!=null'> w.MODIFIED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.MODIFIED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='descriptionLike != null'>AND (<foreach item='item' collection='descriptionLike' separator=' OR '>UPPER(w.DESCRIPTION) LIKE #{item}</foreach>)</if> "
+ "<if test='custom1In != null'>AND UPPER(w.CUSTOM_1) IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1In != null'>AND w.CUSTOM_1 IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' >UPPER(w.CUSTOM_1) LIKE #{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND UPPER(w.CUSTOM_2) IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND w.CUSTOM_2 IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' >UPPER(w.CUSTOM_2) LIKE #{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND UPPER(w.CUSTOM_3) IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND w.CUSTOM_3 IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' >UPPER(w.CUSTOM_3) LIKE #{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND UPPER(w.CUSTOM_4) IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND w.CUSTOM_4 IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' >UPPER(w.CUSTOM_4) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND UPPER(w.ORG_LEVEL_1) IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND w.ORG_LEVEL_1 IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1Like != null'>AND (<foreach item='item' collection='orgLevel1Like' separator=' OR ' >UPPER(w.ORG_LEVEL_1) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND UPPER(w.ORG_LEVEL_2) IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND w.ORG_LEVEL_2 IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2Like != null'>AND (<foreach item='item' collection='orgLevel2Like' separator=' OR ' >UPPER(w.ORG_LEVEL_2) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND UPPER(w.ORG_LEVEL_3) IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND w.ORG_LEVEL_3 IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3Like != null'>AND (<foreach item='item' collection='orgLevel3Like' separator=' OR ' >UPPER(w.ORG_LEVEL_3) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND UPPER(w.ORG_LEVEL_4) IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND w.ORG_LEVEL_4 IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4Like != null'>AND (<foreach item='item' collection='orgLevel4Like' separator=' OR ' >UPPER(w.ORG_LEVEL_4) LIKE #{item}</foreach>)</if> "
+ "<if test = 'joinWithAccessList'> "
+ "<if test = 'checkReadPermission'> "
@ -986,21 +986,21 @@ public interface QueryMapper {
+ "<if test='createdIn !=null'> AND ( <foreach item='item' collection='createdIn' separator=' OR ' > ( <if test='item.begin!=null'> w.CREATED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.CREATED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='modifiedIn !=null'> AND ( <foreach item='item' collection='modifiedIn' separator=' OR ' > ( <if test='item.begin!=null'> w.MODIFIED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.MODIFIED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='descriptionLike != null'>AND (<foreach item='item' collection='descriptionLike' separator=' OR '>UPPER(w.DESCRIPTION) LIKE #{item}</foreach>)</if> "
+ "<if test='custom1In != null'>AND UPPER(w.CUSTOM_1) IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1In != null'>AND w.CUSTOM_1 IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' >UPPER(w.CUSTOM_1) LIKE #{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND UPPER(w.CUSTOM_2) IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND w.CUSTOM_2 IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' >UPPER(w.CUSTOM_2) LIKE #{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND UPPER(w.CUSTOM_3) IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND w.CUSTOM_3 IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' >UPPER(w.CUSTOM_3) LIKE #{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND UPPER(w.CUSTOM_4) IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND w.CUSTOM_4 IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' >UPPER(w.CUSTOM_4) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND UPPER(w.ORG_LEVEL_1) IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND w.ORG_LEVEL_1 IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1Like != null'>AND (<foreach item='item' collection='orgLevel1Like' separator=' OR ' >UPPER(w.ORG_LEVEL_1) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND UPPER(w.ORG_LEVEL_2) IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND w.ORG_LEVEL_2 IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2Like != null'>AND (<foreach item='item' collection='orgLevel2Like' separator=' OR ' >UPPER(w.ORG_LEVEL_2) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND UPPER(w.ORG_LEVEL_3) IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND w.ORG_LEVEL_3 IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3Like != null'>AND (<foreach item='item' collection='orgLevel3Like' separator=' OR ' >UPPER(w.ORG_LEVEL_3) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND UPPER(w.ORG_LEVEL_4) IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND w.ORG_LEVEL_4 IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4Like != null'>AND (<foreach item='item' collection='orgLevel4Like' separator=' OR ' >UPPER(w.ORG_LEVEL_4) LIKE #{item}</foreach>)</if> "
+ "<if test = 'joinWithAccessList'> "
+ "<if test = 'checkReadPermission'> "

View File

@ -45,14 +45,14 @@ public class GetWorkbasketAccTest extends AbstractAccTest {
assertEquals("USER_1_2", workbasket.getKey());
assertEquals(WorkbasketType.PERSONAL, workbasket.getType());
assertEquals("Peter Maier", workbasket.getOwner());
assertEquals("Versicherung", workbasket.getOrgLevel1());
assertEquals("Abteilung", workbasket.getOrgLevel2());
assertEquals("Projekt", workbasket.getOrgLevel3());
assertEquals("Team", workbasket.getOrgLevel4());
assertEquals("Custom1", workbasket.getCustom1());
assertEquals("Custom2", workbasket.getCustom2());
assertEquals("Custom3", workbasket.getCustom3());
assertEquals("Custom4", workbasket.getCustom4());
assertEquals("versicherung", workbasket.getOrgLevel1());
assertEquals("abteilung", workbasket.getOrgLevel2());
assertEquals("projekt", workbasket.getOrgLevel3());
assertEquals("team", workbasket.getOrgLevel4());
assertEquals("custom1", workbasket.getCustom1());
assertEquals("custom2", workbasket.getCustom2());
assertEquals("custom3", workbasket.getCustom3());
assertEquals("custom4", workbasket.getCustom4());
}
@WithAccessId(
@ -70,14 +70,14 @@ public class GetWorkbasketAccTest extends AbstractAccTest {
assertEquals("PPK User 2 KSC 1", workbasket.getName());
assertEquals(WorkbasketType.PERSONAL, workbasket.getType());
assertEquals("Peter Maier", workbasket.getOwner());
assertEquals("Versicherung", workbasket.getOrgLevel1());
assertEquals("Abteilung", workbasket.getOrgLevel2());
assertEquals("Projekt", workbasket.getOrgLevel3());
assertEquals("Team", workbasket.getOrgLevel4());
assertEquals("Custom1", workbasket.getCustom1());
assertEquals("Custom2", workbasket.getCustom2());
assertEquals("Custom3", workbasket.getCustom3());
assertEquals("Custom4", workbasket.getCustom4());
assertEquals("versicherung", workbasket.getOrgLevel1());
assertEquals("abteilung", workbasket.getOrgLevel2());
assertEquals("projekt", workbasket.getOrgLevel3());
assertEquals("team", workbasket.getOrgLevel4());
assertEquals("custom1", workbasket.getCustom1());
assertEquals("custom2", workbasket.getCustom2());
assertEquals("custom3", workbasket.getCustom3());
assertEquals("custom4", workbasket.getCustom4());
}
@WithAccessId(
@ -125,10 +125,10 @@ public class GetWorkbasketAccTest extends AbstractAccTest {
assertEquals("USER_1_2", workbasketSummary.getKey());
assertEquals(WorkbasketType.PERSONAL, workbasketSummary.getType());
assertEquals("Peter Maier", workbasketSummary.getOwner());
assertEquals("Versicherung", workbasketSummary.getOrgLevel1());
assertEquals("Abteilung", workbasketSummary.getOrgLevel2());
assertEquals("Projekt", workbasketSummary.getOrgLevel3());
assertEquals("Team", workbasketSummary.getOrgLevel4());
assertEquals("versicherung", workbasketSummary.getOrgLevel1());
assertEquals("abteilung", workbasketSummary.getOrgLevel2());
assertEquals("projekt", workbasketSummary.getOrgLevel3());
assertEquals("team", workbasketSummary.getOrgLevel4());
}
@Test(expected = WorkbasketNotFoundException.class)

View File

@ -459,30 +459,11 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
assertEquals("WBI:100000000000000000000000000000000001", results.get(1).getId());
}
// TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
@Ignore
@WithAccessId(
userName = "admin",
groupNames = "")
@Test
public void testQueryForCustom1LikeOrderByCustom1Asc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom1Like("ABC%")
.orderByCustom1(asc)
.list();
assertEquals(3, results.size());
assertEquals("WBI:100000000000000000000000000000000015", results.get(0).getId());
assertEquals("WBI:100000000000000000000000000000000001", results.get(1).getId());
assertEquals("WBI:100000000000000000000000000000000008", results.get(2).getId());
}
@WithAccessId(
userName = "teamlead_1",
groupNames = {"group_1"})
@Test
public void testQueryWorkbasketCustom1In() {
public void testQueryForCustom1In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom1In("ABCQVW").list();
@ -490,4 +471,266 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
assertEquals(1, results.size());
assertEquals("WBI:100000000000000000000000000000000001", results.get(0).getId());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom1Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom1Like("custo%")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom2In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom2In("cust2", "custom2")
.list();
assertEquals(3, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom2Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom2Like("cusTo%")
.list();
assertEquals(3, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom3In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom3In("custom3")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom3Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom3Like("cu%")
.list();
assertEquals(3, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom4In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom4In("custom4", "team")
.list();
assertEquals(3, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForCustom4Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.custom4Like("%u%")
.list();
assertEquals(4, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevl1In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel1In("orgl1", "")
.list();
assertEquals(24, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel1Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel1Like("%1")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel2In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel2In("abteilung")
.list();
assertEquals(1, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel2Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel2Like("ab%")
.list();
assertEquals(1, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel3In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel3In("orgl3")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel3Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel3Like("org%")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel4In() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel4In("team", "orgl4")
.list();
assertEquals(2, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrgLevel4Like() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orgLevel4Like("%")
.list();
assertEquals(25, results.size());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByOrgLevel1Desc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByOrgLevel1(desc)
.list();
assertEquals("WBI:100000000000000000000000000000000007", results.get(0).getId());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByOrgLevel2Asc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByOrgLevel2(asc)
.list();
assertEquals("WBI:100000000000000000000000000000000007", results.get(results.size() - 3).getId());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByOrgLevel3Desc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByOrgLevel3(desc)
.list();
assertEquals("WBI:100000000000000000000000000000000007", results.get(0).getId());
}
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByOrgLevel4Asc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByOrgLevel4(asc)
.list();
assertEquals("WBI:100000000000000000000000000000000012", results.get(results.size() - 3).getId());
}
// TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
@Ignore
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByCustom1Asc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByCustom1(asc)
.list();
assertEquals("WBI:100000000000000000000000000000000015", results.get(results.size() - 4).getId());
}
// TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
@Ignore
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByCustom2Desc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByCustom2(desc)
.list();
assertEquals("WBI:100000000000000000000000000000000014", results.get(0).getId());
}
// TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
@Ignore
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByCustom3Asc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByCustom3(asc)
.list();
assertEquals("WBI:100000000000000000000000000000000015", results.get(results.size() - 3).getId());
}
// TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
@Ignore
@WithAccessId(
userName = "admin")
@Test
public void testQueryForOrderByCustom4Desc() {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
.orderByCustom4(desc)
.list();
assertEquals("WBI:100000000000000000000000000000000001", results.get(0).getId());
}
}

View File

@ -1,21 +1,21 @@
-- KSC workbaskets
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000001', 'GPK_KSC', '2018-02-01 12:00:00', '2018-02-01 12:00:00', 'Gruppenpostkorb KSC', 'DOMAIN_A', 'GROUP', 'Gruppenpostkorb KSC', 'owner0815', 'ABCQVW', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000001', 'GPK_KSC', '2018-02-01 12:00:00', '2018-02-01 12:00:00', 'Gruppenpostkorb KSC', 'DOMAIN_A', 'GROUP', 'Gruppenpostkorb KSC', 'owner0815', 'ABCQVW', '', 'xyz4', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000002', 'GPK_KSC_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC 1', 'DOMAIN_A', 'GROUP', 'Gruppenpostkorb KSC 1', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000003', 'GPK_KSC_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC 2', 'DOMAIN_A', 'GROUP', 'Gruppenpostkorb KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000004', 'TEAMLEAD_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK Teamlead KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK Teamlead KSC 1', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000005', 'TEAMLEAD_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK Teamlead KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK Teamlead KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000006', 'USER_1_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 1 KSC 1', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000007', 'USER_1_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 2 KSC 1', 'Peter Maier', 'Custom1', 'Custom2', 'Custom3', 'Custom4', 'Versicherung', 'Abteilung', 'Projekt', 'Team');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000007', 'USER_1_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 2 KSC 1', 'Peter Maier', 'custom1', 'custom2', 'custom3', 'custom4', 'versicherung', 'abteilung', 'projekt', 'team');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000008', 'USER_2_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK User 1 KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000009', 'USER_2_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK User 2 KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000010', 'TPK_VIP', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Themenpostkorb VIP', 'DOMAIN_A', 'TOPIC', 'Themenpostkorb VIP', '', '', '', '', '', '', '', '', '');
-- KSC workbaskets Domain_B
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000011', 'GPK_B_KSC', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC B', 'DOMAIN_B', 'GROUP', 'Gruppenpostkorb KSC', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000012', 'GPK_B_KSC_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC B1', 'DOMAIN_B', 'GROUP', 'Gruppenpostkorb KSC 1', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000012', 'GPK_B_KSC_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC B1', 'DOMAIN_B', 'GROUP', 'Gruppenpostkorb KSC 1', '', 'custom1', 'custom2', 'custom3', 'custom4', 'orgl1', 'orgl2', 'orgl3', 'aorgl4');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000013', 'GPK_B_KSC_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC B2', 'DOMAIN_B', 'GROUP', 'Gruppenpostkorb KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000014', 'USER_3_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000015', 'USER_3_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B', 'owner0815', 'ABCABC', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000014', 'USER_3_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B', '', '', 'custom20', '', 'custom4', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000015', 'USER_3_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B', 'owner0815', 'ABCABC', 'cust2', 'cust3', 'cust4', 'orgl1', 'orgl2', 'orgl3', 'orgl4');
-- Workbaskets for sorting test
INSERT INTO TASKANA.WORKBASKET VALUES ('0000000000000000000000000000000000000900', 'sort001', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'basxet0', 'DOM_XY', 'TOPIC', 'Lorem ipsum dolor sit amet.', 'Max', '', '', '', '', '', '', '', '');