From bcd4a5cf28380266b5e2f59d1899664f7545b98d Mon Sep 17 00:00:00 2001 From: Lars Johansson <lars.johansson@ess.eu> Date: Thu, 23 Jun 2022 17:02:31 +0200 Subject: [PATCH] Refactor integration tests Update test utility methods including order of parameters. Refactor integration tests. --- .../names/docker/ITUtilNameElement.java | 31 +- .../names/docker/ITUtilStructureElement.java | 188 ++++---- .../org/openepics/names/docker/NamesIT.java | 40 +- .../names/docker/StructuresDeviceGroupIT.java | 298 ++++++------- .../names/docker/StructuresDeviceTypeIT.java | 300 ++++++------- .../names/docker/StructuresDisciplineIT.java | 248 +++++------ .../names/docker/StructuresSubsystemIT.java | 420 +++++++++--------- .../names/docker/StructuresSystemGroupIT.java | 248 +++++------ .../names/docker/StructuresSystemIT.java | 298 ++++++------- .../names/docker/complex/NamesMultipleIT.java | 24 +- .../docker/complex/StructuresMultipleIT.java | 18 +- .../docker/complex/StructuresNamesIT.java | 30 +- 12 files changed, 1088 insertions(+), 1055 deletions(-) diff --git a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java index 3319e28e..63857ecf 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java @@ -208,15 +208,34 @@ public class ITUtilNameElement { // ---------------------------------------------------------------------------------------------------- + /** + * Utility method to read name elements. + * + * @param queryString query string + * @return response page name elements + */ + public static ResponsePageNameElements assertRead(String queryString) { + return assertRead(queryString, -1, -1); + } + /** + * Utility method to read name elements and assert number of items in list. + * + * @param queryString query string + * @param expectedEqual (if non-negative number) equal to this number of items + * @return response page name elements + */ + public static ResponsePageNameElements assertRead(String queryString, int expectedEqual) { + return assertRead(queryString, expectedEqual, expectedEqual); + } /** * Utility method to read name elements and assert number of items in list. * * @param queryString query string - * @param expectedLessThanOrEqual (if non-negative number) less than or equal to this number of items * @param expectedGreaterThanOrEqual (if non-negative number) greater than or equal to this number of items + * @param expectedLessThanOrEqual (if non-negative number) less than or equal to this number of items * @return response page name elements */ - public static ResponsePageNameElements assertRead(String queryString, int expectedLessThanOrEqual, int expectedGreaterThanOrEqual) { + public static ResponsePageNameElements assertRead(String queryString, int expectedGreaterThanOrEqual, int expectedLessThanOrEqual) { try { String[] response = null; ResponsePageNameElements responsePageNameElements = null; @@ -226,12 +245,14 @@ public class ITUtilNameElement { responsePageNameElements = mapper.readValue(response[1], ResponsePageNameElements.class); // expected number of items in list - if (expectedLessThanOrEqual >= 0) { - assertTrue(responsePageNameElements.getListSize() <= expectedLessThanOrEqual); - } + // (if non-negative number) + // expectedGreaterThanOrEqual <= nbr of items <= expectedLessThanOrEqual if (expectedGreaterThanOrEqual >= 0) { assertTrue(responsePageNameElements.getListSize() >= expectedGreaterThanOrEqual); } + if (expectedLessThanOrEqual >= 0) { + assertTrue(responsePageNameElements.getListSize() <= expectedLessThanOrEqual); + } // expected value for latest for items in list assertLatest(responsePageNameElements); diff --git a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java index 268d0d29..57382485 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java @@ -210,15 +210,34 @@ public class ITUtilStructureElement { // ---------------------------------------------------------------------------------------------------- + /** + * Utility method to read structure elements. + * + * @param queryString query string + * @return response page structure elements + */ + public static ResponsePageStructureElements assertRead(String queryString) { + return assertRead(queryString, -1, -1); + } + /** + * Utility method to read structure elements and assert number of items in list. + * + * @param queryString query string + * @param expectedEqual (if non-negative number) equal to this number of items + * @return response page structure elements + */ + public static ResponsePageStructureElements assertRead(String queryString, int expectedEqual) { + return assertRead(queryString, expectedEqual, expectedEqual); + } /** * Utility method to read structure elements and assert number of items in list. * * @param queryString query string - * @param expectedLessThanOrEqual (if non-negative number) less than or equal to this number of items * @param expectedGreaterThanOrEqual (if non-negative number) greater than or equal to this number of items + * @param expectedLessThanOrEqual (if non-negative number) less than or equal to this number of items * @return response page structure elements */ - public static ResponsePageStructureElements assertRead(String queryString, int expectedLessThanOrEqual, int expectedGreaterThanOrEqual) { + public static ResponsePageStructureElements assertRead(String queryString, int expectedGreaterThanOrEqual, int expectedLessThanOrEqual) { try { String[] response = null; ResponsePageStructureElements responsePageStructureElements = null; @@ -228,12 +247,14 @@ public class ITUtilStructureElement { responsePageStructureElements = mapper.readValue(response[1], ResponsePageStructureElements.class); // expected number of items in list - if (expectedLessThanOrEqual >= 0) { - assertTrue(responsePageStructureElements.getListSize() <= expectedLessThanOrEqual); - } + // (if non-negative number) + // expectedGreaterThanOrEqual <= nbr of items <= expectedLessThanOrEqual if (expectedGreaterThanOrEqual >= 0) { assertTrue(responsePageStructureElements.getListSize() >= expectedGreaterThanOrEqual); } + if (expectedLessThanOrEqual >= 0) { + assertTrue(responsePageStructureElements.getListSize() <= expectedLessThanOrEqual); + } // expected value for latest for items in list assertLatest(responsePageStructureElements); @@ -785,6 +806,8 @@ public class ITUtilStructureElement { return null; } + // -------------------- + /** * Utility method to create, approve a structure element and assert result. * @@ -794,89 +817,6 @@ public class ITUtilStructureElement { public static StructureElement assertCreateApprove(StructureElementCommand structureElement) { return assertApprove(assertCreate(structureElement)); } - - /** - * Utility method to create, cancel a structure element and assert result. - * - * @param structureElement structure element - * @return cancelled structure element (after create) - */ - public static StructureElement assertCreateCancel(StructureElementCommand structureElement) { - return assertCancel(assertCreate(structureElement)); - } - - /** - * Utility method to create, reject a structure element and assert result. - * - * @param structureElement structure element - * @return rejected structure element (after create) - */ - public static StructureElement assertCreateReject(StructureElementCommand structureElement) { - return assertReject(assertCreate(structureElement)); - } - - /** - * Utility method to update, approve a structure element and assert result. - * - * @param structureElement structure element - * @return approved structure element (after update) - */ - public static StructureElement assertUpdateApprove(StructureElementCommand structureElement) { - return assertApprove(assertUpdate(structureElement)); - } - - /** - * Utility method to update, cancel a structure element and assert result. - * - * @param structureElement structure element - * @return cancelled structure element (after update) - */ - public static StructureElement assertUpdateCancel(StructureElementCommand structureElement) { - return assertCancel(assertUpdate(structureElement)); - } - - /** - * Utility method to update, reject a structure element and assert result. - * - * @param structureElement structure element - * @return rejected structure element (after update) - */ - public static StructureElement assertUpdateReject(StructureElementCommand structureElement) { - return assertReject(assertUpdate(structureElement)); - } - - /** - * Utility method to delete, approve a structure element and assert result. - * - * @param structureElement structure element - * @return approved structure element (after delete) - */ - public static StructureElement assertDeleteApprove(StructureElementCommand structureElement) { - return assertApprove(assertDelete(structureElement)); - } - - /** - * Utility method to delete, cancel a structure element and assert result. - * - * @param structureElement structure element - * @return cancelled structure element (after delete) - */ - public static StructureElement assertDeleteCancel(StructureElementCommand structureElement) { - return assertCancel(assertDelete(structureElement)); - } - - /** - * Utility method to delete, reject a structure element and assert result. - * - * @param structureElement structure element - * @return rejected structure element (after delete) - */ - public static StructureElement assertDeleteReject(StructureElementCommand structureElement) { - return assertReject(assertDelete(structureElement)); - } - - // -------------------- - /** * Utility method to create, approve structure elements and assert result. * @@ -887,6 +827,15 @@ public class ITUtilStructureElement { return assertApprove(assertCreate(structureElements)); } + /** + * Utility method to create, cancel a structure element and assert result. + * + * @param structureElement structure element + * @return cancelled structure element (after create) + */ + public static StructureElement assertCreateCancel(StructureElementCommand structureElement) { + return assertCancel(assertCreate(structureElement)); + } /** * Utility method to create, cancel structure elements and assert result. * @@ -897,6 +846,15 @@ public class ITUtilStructureElement { return assertCancel(assertCreate(structureElements)); } + /** + * Utility method to create, reject a structure element and assert result. + * + * @param structureElement structure element + * @return rejected structure element (after create) + */ + public static StructureElement assertCreateReject(StructureElementCommand structureElement) { + return assertReject(assertCreate(structureElement)); + } /** * Utility method to create, reject structure elements and assert result. * @@ -907,6 +865,15 @@ public class ITUtilStructureElement { return assertReject(assertCreate(structureElements)); } + /** + * Utility method to update, approve a structure element and assert result. + * + * @param structureElement structure element + * @return approved structure element (after update) + */ + public static StructureElement assertUpdateApprove(StructureElementCommand structureElement) { + return assertApprove(assertUpdate(structureElement)); + } /** * Utility method to update, approve structure elements and assert result. * @@ -917,6 +884,15 @@ public class ITUtilStructureElement { return assertApprove(assertUpdate(structureElements)); } + /** + * Utility method to update, cancel a structure element and assert result. + * + * @param structureElement structure element + * @return cancelled structure element (after update) + */ + public static StructureElement assertUpdateCancel(StructureElementCommand structureElement) { + return assertCancel(assertUpdate(structureElement)); + } /** * Utility method to update, cancel structure elements and assert result. * @@ -927,6 +903,15 @@ public class ITUtilStructureElement { return assertCancel(assertUpdate(structureElements)); } + /** + * Utility method to update, reject a structure element and assert result. + * + * @param structureElement structure element + * @return rejected structure element (after update) + */ + public static StructureElement assertUpdateReject(StructureElementCommand structureElement) { + return assertReject(assertUpdate(structureElement)); + } /** * Utility method to update, reject structure elements and assert result. * @@ -937,6 +922,15 @@ public class ITUtilStructureElement { return assertReject(assertUpdate(structureElements)); } + /** + * Utility method to delete, approve a structure element and assert result. + * + * @param structureElement structure element + * @return approved structure element (after delete) + */ + public static StructureElement assertDeleteApprove(StructureElementCommand structureElement) { + return assertApprove(assertDelete(structureElement)); + } /** * Utility method to delete, approve structure elements and assert result. * @@ -947,6 +941,15 @@ public class ITUtilStructureElement { return assertApprove(assertDelete(structureElements)); } + /** + * Utility method to delete, cancel a structure element and assert result. + * + * @param structureElement structure element + * @return cancelled structure element (after delete) + */ + public static StructureElement assertDeleteCancel(StructureElementCommand structureElement) { + return assertCancel(assertDelete(structureElement)); + } /** * Utility method to delete, cancel structure elements and assert result. * @@ -957,6 +960,15 @@ public class ITUtilStructureElement { return assertCancel(assertDelete(structureElements)); } + /** + * Utility method to delete, reject a structure element and assert result. + * + * @param structureElement structure element + * @return rejected structure element (after delete) + */ + public static StructureElement assertDeleteReject(StructureElementCommand structureElement) { + return assertReject(assertDelete(structureElement)); + } /** * Utility method to delete, reject structure elements and assert result. * diff --git a/src/test/java/org/openepics/names/docker/NamesIT.java b/src/test/java/org/openepics/names/docker/NamesIT.java index 648d9526..091c5ebf 100644 --- a/src/test/java/org/openepics/names/docker/NamesIT.java +++ b/src/test/java/org/openepics/names/docker/NamesIT.java @@ -792,34 +792,34 @@ class NamesIT { try { // read - ITUtilNameElement.assertRead("", -1, 8); + ITUtilNameElement.assertRead("", 8, -1); - ITUtilNameElement.assertRead("?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilNameElement.assertRead("?queryFields=NAMEEQUIVALENCE&queryValues=RFQ-10%25", -1, 8); + ITUtilNameElement.assertRead("?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilNameElement.assertRead("?queryFields=NAMEEQUIVALENCE&queryValues=RFQ-10%25", 8, -1); - ITUtilNameElement.assertRead("?deleted=false", -1, 6); - ITUtilNameElement.assertRead("?deleted=true", -1, 2); + ITUtilNameElement.assertRead("?deleted=false", 6, -1); + ITUtilNameElement.assertRead("?deleted=true", 2, -1); - ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-005", 1, 1); - ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0", 0, 0); - ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0__", -1, 6); - ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0%25", -1, 6); + ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-005", 1); + ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0", 0); + ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0__", 6, -1); + ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0%25", 6, -1); - ITUtilNameElement.assertRead("/systemstructure/RFQ-010", -1, 6); - ITUtilNameElement.assertRead("/systemstructure/RFQ-0", 0, 0); - ITUtilNameElement.assertRead("/systemstructure/RFQ-0__", -1, 6); - ITUtilNameElement.assertRead("/systemstructure/RFQ-N1U1", 1, 1); + ITUtilNameElement.assertRead("/systemstructure/RFQ-010", 6, -1); + ITUtilNameElement.assertRead("/systemstructure/RFQ-0", 0); + ITUtilNameElement.assertRead("/systemstructure/RFQ-0__", 6, -1); + ITUtilNameElement.assertRead("/systemstructure/RFQ-N1U1", 1); - ITUtilNameElement.assertRead("/devicestructure/EMR-FS", -1, 6); - ITUtilNameElement.assertRead("/devicestructure/EMR-F", 0, 0); - ITUtilNameElement.assertRead("/devicestructure/EMR-F_", -1, 6); - ITUtilNameElement.assertRead("/devicestructure/EMR-TT", 0, 0); + ITUtilNameElement.assertRead("/devicestructure/EMR-FS", 6, -1); + ITUtilNameElement.assertRead("/devicestructure/EMR-F", 0); + ITUtilNameElement.assertRead("/devicestructure/EMR-F_", 6, -1); + ITUtilNameElement.assertRead("/devicestructure/EMR-TT", 0); // history - ITUtilNameElement.assertRead("/history/" + systemRFQ.toString(), 0, 0); - ITUtilNameElement.assertRead("/history/" + uuid.toString(), 3, 3); - ITUtilNameElement.assertRead("/history/" + uuid2.toString(), 1, 1); + ITUtilNameElement.assertRead("/history/" + systemRFQ.toString(), 0); + ITUtilNameElement.assertRead("/history/" + uuid.toString(), 3); + ITUtilNameElement.assertRead("/history/" + uuid2.toString(), 1); } catch (Exception e) { fail(); } diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java index 95962f51..62675599 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java @@ -982,27 +982,27 @@ class StructuresDeviceGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); @@ -1010,27 +1010,27 @@ class StructuresDeviceGroupIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); } catch (Exception e) { @@ -1065,27 +1065,27 @@ class StructuresDeviceGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); @@ -1093,27 +1093,27 @@ class StructuresDeviceGroupIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); } catch (Exception e) { @@ -1148,27 +1148,27 @@ class StructuresDeviceGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); @@ -1176,27 +1176,27 @@ class StructuresDeviceGroupIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICEGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); } catch (Exception e) { @@ -1279,22 +1279,22 @@ class StructuresDeviceGroupIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 0); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di-P1", Boolean.FALSE); @@ -1449,22 +1449,22 @@ class StructuresDeviceGroupIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C9", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R9", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A9", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/P9", 0); + ITUtilStructureElement.assertRead("/mnemonic/C9", 0); + ITUtilStructureElement.assertRead("/mnemonic/R9", 0); + ITUtilStructureElement.assertRead("/mnemonic/A9", 0); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di-P9", Boolean.FALSE); @@ -1773,29 +1773,29 @@ class StructuresDeviceGroupIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=MNEMONICPATH&queryValues=Di2", 30, 30); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 5, 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 20, 20); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 5, 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 25, 25); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&queryFields=MNEMONICPATH&queryValues=Di2", 15, 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 15, 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 15, 15); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&queryFields=MNEMONICPATH&queryValues=Di2", 15, 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 5, 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 5, 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0, 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 5, 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 10, 10); - - ITUtilStructureElement.assertRead("/children/DEVICEGROUP/" + uuid.toString(), 0, 0); - ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + disciplineUuid.toString(), -1, 1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?queryFields=MNEMONICPATH&queryValues=Di2", 30); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 20); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 25); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&queryFields=MNEMONICPATH&queryValues=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 15); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&queryFields=MNEMONICPATH&queryValues=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&queryFields=MNEMONICPATH&queryValues=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=CANCELLED&queryFields=MNEMONICPATH&queryValues=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=REJECTED&queryFields=MNEMONICPATH&queryValues=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONICPATH&queryValues=Di2", 10); + + ITUtilStructureElement.assertRead("/children/DEVICEGROUP/" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + disciplineUuid.toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Di2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java index bb6cefb7..6016a0c9 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java @@ -986,27 +986,27 @@ class StructuresDeviceTypeIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rsha", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rsha", Boolean.FALSE); @@ -1015,27 +1015,27 @@ class StructuresDeviceTypeIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 1, 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 1); - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rsha", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rsha", Boolean.TRUE); @@ -1071,27 +1071,27 @@ class StructuresDeviceTypeIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rshc", Boolean.FALSE); @@ -1100,27 +1100,27 @@ class StructuresDeviceTypeIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rshc", Boolean.FALSE); @@ -1156,27 +1156,27 @@ class StructuresDeviceTypeIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rshr", Boolean.FALSE); @@ -1185,27 +1185,27 @@ class StructuresDeviceTypeIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DEVICETYPE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Di", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Di", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", -1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Rshr", Boolean.FALSE); @@ -1289,22 +1289,22 @@ class StructuresDeviceTypeIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 1); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "P1", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "C1", Boolean.FALSE); @@ -1462,22 +1462,22 @@ class StructuresDeviceTypeIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/C9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/R9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/A9", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P9", 1); + ITUtilStructureElement.assertRead("/mnemonic/C9", 1); + ITUtilStructureElement.assertRead("/mnemonic/R9", 1); + ITUtilStructureElement.assertRead("/mnemonic/A9", 1); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "P9", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "C9", Boolean.FALSE); @@ -1789,30 +1789,30 @@ class StructuresDeviceTypeIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=MNEMONIC&queryValues=A__", 45, 45); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30, 30); - - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30, 30); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0, 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - - ITUtilStructureElement.assertRead("/children/DEVICETYPE/" + uuid.toString(), 0, 0); - ITUtilStructureElement.assertRead("/children/DEVICEGROUP/" + deviceGroupUuid.toString(), -1, 1); - ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + disciplineUuid.toString(), -1, 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?queryFields=MNEMONIC&queryValues=A__", 45); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30); + + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10); + + ITUtilStructureElement.assertRead("/children/DEVICETYPE/" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/children/DEVICEGROUP/" + deviceGroupUuid.toString(), 1, -1); + ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + disciplineUuid.toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-AA1", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-AA2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java index 6dcd7234..daa62485 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java @@ -929,23 +929,23 @@ class StructuresDisciplineIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rsha", Boolean.FALSE); @@ -953,23 +953,23 @@ class StructuresDisciplineIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1, 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rsha", Boolean.TRUE); } catch (Exception e) { @@ -1004,23 +1004,23 @@ class StructuresDisciplineIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rshc", Boolean.FALSE); @@ -1028,23 +1028,23 @@ class StructuresDisciplineIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rshc", Boolean.FALSE); } catch (Exception e) { @@ -1079,23 +1079,23 @@ class StructuresDisciplineIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rshr", Boolean.FALSE); @@ -1103,23 +1103,23 @@ class StructuresDisciplineIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/DISCIPLINE", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Rshr", Boolean.FALSE); } catch (Exception e) { @@ -1202,22 +1202,22 @@ class StructuresDisciplineIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 1); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "P1", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "C1", Boolean.FALSE); @@ -1371,22 +1371,22 @@ class StructuresDisciplineIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/C9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/R9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/A9", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P9", 1); + ITUtilStructureElement.assertRead("/mnemonic/C9", 1); + ITUtilStructureElement.assertRead("/mnemonic/R9", 1); + ITUtilStructureElement.assertRead("/mnemonic/A9", 1); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "P9", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "C9", Boolean.TRUE); @@ -1694,28 +1694,28 @@ class StructuresDisciplineIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=MNEMONIC&queryValues=A__", 45, 45); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30, 30); - - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30, 30); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0, 0); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - - ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + uuid.toString(), 0, 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?queryFields=MNEMONIC&queryValues=A__", 45); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30); + + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10); + + ITUtilStructureElement.assertRead("/children/DISCIPLINE/" + uuid.toString(), 0); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "AA1", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "AA2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java index ce7eca70..80caad58 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java @@ -988,33 +988,33 @@ class StructuresSubsystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize(); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + length = ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize(); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0); + + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rsha", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rsha", Boolean.FALSE); @@ -1024,33 +1024,33 @@ class StructuresSubsystemIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize()); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), -1, 1); + assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize()); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0); + + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rsha", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rsha", Boolean.TRUE); @@ -1087,33 +1087,33 @@ class StructuresSubsystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize(); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + length = ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize(); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0); + + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rshc", Boolean.FALSE); @@ -1123,33 +1123,33 @@ class StructuresSubsystemIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize()); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize()); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0); + + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rshc", Boolean.FALSE); @@ -1186,33 +1186,33 @@ class StructuresSubsystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize(); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + length = ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize(); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0); + + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rshr", Boolean.FALSE); @@ -1222,33 +1222,33 @@ class StructuresSubsystemIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", -1, 1).getListSize()); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); - - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0, 0); - - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0, 0); - - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + assertEquals(length, ITUtilStructureElement.assertRead("/SUBSYSTEM", 1, -1).getListSize()); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); + + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0); + + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0); + + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Rshr", Boolean.FALSE); @@ -1333,22 +1333,22 @@ class StructuresSubsystemIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 1); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "P1", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "C1", Boolean.FALSE); @@ -1510,22 +1510,22 @@ class StructuresSubsystemIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/C9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/R9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/A9", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P9", 1); + ITUtilStructureElement.assertRead("/mnemonic/C9", 1); + ITUtilStructureElement.assertRead("/mnemonic/R9", 1); + ITUtilStructureElement.assertRead("/mnemonic/A9", 1); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "P9", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "C9", Boolean.FALSE); @@ -1841,30 +1841,30 @@ class StructuresSubsystemIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=MNEMONIC&queryValues=A__", 45, 45); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30, 30); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30, 30); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0, 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - - ITUtilStructureElement.assertRead("/children/SUBSYSTEM/" + uuid.toString(), 0, 0); - ITUtilStructureElement.assertRead("/children/SYSTEM/" + systemUuid.toString(), -1, 1); - ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + systemGroupUuid.toString(), -1, 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?queryFields=MNEMONIC&queryValues=A__", 45); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10); + + ITUtilStructureElement.assertRead("/children/SUBSYSTEM/" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/children/SYSTEM/" + systemUuid.toString(), 1, -1); + ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + systemGroupUuid.toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-AA1", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-AA2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java index 91ae62b2..b017c149 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java @@ -973,23 +973,23 @@ class StructuresSystemGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rsha", Boolean.FALSE); @@ -997,23 +997,23 @@ class StructuresSystemGroupIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1, 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rsha", Boolean.TRUE); } catch (Exception e) { @@ -1048,23 +1048,23 @@ class StructuresSystemGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rshc", Boolean.FALSE); @@ -1072,23 +1072,23 @@ class StructuresSystemGroupIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rshc", Boolean.FALSE); } catch (Exception e) { @@ -1123,23 +1123,23 @@ class StructuresSystemGroupIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rshr", Boolean.FALSE); @@ -1147,23 +1147,23 @@ class StructuresSystemGroupIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEMGROUP", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Rshr", Boolean.FALSE); } catch (Exception e) { @@ -1246,22 +1246,22 @@ class StructuresSystemGroupIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 1); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "P1", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "C1", Boolean.FALSE); @@ -1415,22 +1415,22 @@ class StructuresSystemGroupIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/C9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/R9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/A9", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P9", 1); + ITUtilStructureElement.assertRead("/mnemonic/C9", 1); + ITUtilStructureElement.assertRead("/mnemonic/R9", 1); + ITUtilStructureElement.assertRead("/mnemonic/A9", 1); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "P9", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "C9", Boolean.TRUE); @@ -1738,28 +1738,28 @@ class StructuresSystemGroupIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=MNEMONIC&queryValues=A__", 45, 45); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30, 30); - - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30, 30); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - - ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + uuid.toString(), 0, 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?queryFields=MNEMONIC&queryValues=A__", 45); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30); + + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10); + + ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + uuid.toString(), 0); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "AA1", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "AA2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java index ebb896be..74b01f6b 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java @@ -971,27 +971,27 @@ class StructuresSystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rsha", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rsha", Boolean.FALSE); @@ -1000,27 +1000,27 @@ class StructuresSystemIT { approvedStructureElement = ITUtilStructureElement.assertApprove(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rsha", 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rsha", 0); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + approvedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rsha", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rsha", Boolean.FALSE); @@ -1056,27 +1056,27 @@ class StructuresSystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rshc", Boolean.FALSE); @@ -1085,27 +1085,27 @@ class StructuresSystemIT { cancelledStructureElement = ITUtilStructureElement.assertCancel(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshc", 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshc", 0); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + cancelledStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rshc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rshc", Boolean.FALSE); @@ -1141,27 +1141,27 @@ class StructuresSystemIT { structureElement.setUuid(createdStructureElement.getUuid()); // read (1) - length = ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize(); + length = ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize(); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + createdStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rshr", Boolean.FALSE); @@ -1170,27 +1170,27 @@ class StructuresSystemIT { rejectedStructureElement = ITUtilStructureElement.assertReject(structureElement); // read (2) - assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", -1, 1).getListSize()); + assertEquals(length, ITUtilStructureElement.assertRead("/SYSTEM", 1, -1).getListSize()); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", -1, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", -1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED", 0, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED", 1, -1); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=Rshr", 0); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=Rshr", 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + rejectedStructureElement.getUuid().toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1, 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0, 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0, 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), -1, 1); + ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "Rshr", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sg-Rshr", Boolean.FALSE); @@ -1274,22 +1274,22 @@ class StructuresSystemIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/C1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/R1", 0, 0); - ITUtilStructureElement.assertRead("/mnemonic/A1", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P1", 0); + ITUtilStructureElement.assertRead("/mnemonic/C1", 0); + ITUtilStructureElement.assertRead("/mnemonic/R1", 0); + ITUtilStructureElement.assertRead("/mnemonic/A1", 1); // normally expected number of entries are 1, 2, 2, 2 // since within 1 second from requested to processed, expected number of entries 1, 1, 1, 1 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1, 1); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 1); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 1); ITUtilStructureElement.assertExists(Type.SYSTEM, "P1", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.SYSTEM, "C1", Boolean.FALSE); @@ -1447,22 +1447,22 @@ class StructuresSystemIT { // ( include if latest ) // include if latest not exists (considered present + future) - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 2, 2); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid2.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid3.toString(), 2); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=UUID&queryValues=" + uuid4.toString(), 1); - ITUtilStructureElement.assertRead("/mnemonic/P9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/C9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/R9", 1, 1); - ITUtilStructureElement.assertRead("/mnemonic/A9", 1, 1); + ITUtilStructureElement.assertRead("/mnemonic/P9", 1); + ITUtilStructureElement.assertRead("/mnemonic/C9", 1); + ITUtilStructureElement.assertRead("/mnemonic/R9", 1); + ITUtilStructureElement.assertRead("/mnemonic/A9", 1); // normally expected number of entries are 17, 18, 18, 18 // since within 1 second from requested to processed, expected number of entries 9, 9, 9, 9 - ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9, 9); - ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9, 9); + ITUtilStructureElement.assertRead("/history/" + uuid.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid2.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid3.toString(), 9); + ITUtilStructureElement.assertRead("/history/" + uuid4.toString(), 9); ITUtilStructureElement.assertExists(Type.SYSTEM, "P9", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEM, "C9", Boolean.TRUE); @@ -1774,29 +1774,29 @@ class StructuresSystemIT { // from first structure element assertNotNull(uuid); - ITUtilStructureElement.assertRead("/SYSTEM?queryFields=MNEMONIC&queryValues=A__", 45, 45); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30, 30); - - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30, 30); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20, 20); - - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15, 15); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0, 0); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5, 5); - ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10, 10); - - ITUtilStructureElement.assertRead("/children/SYSTEM/" + uuid.toString(), 0, 0); - ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + systemGroupUuid.toString(), -1, 1); + ITUtilStructureElement.assertRead("/SYSTEM?queryFields=MNEMONIC&queryValues=A__", 45); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 10); + ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 30); + + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&queryFields=MNEMONIC&queryValues=A__", 30); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=false&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 20); + + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&queryFields=MNEMONIC&queryValues=A__", 15); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=PENDING&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=CANCELLED&queryFields=MNEMONIC&queryValues=A__", 0); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=REJECTED&queryFields=MNEMONIC&queryValues=A__", 5); + ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&queryFields=MNEMONIC&queryValues=A__", 10); + + ITUtilStructureElement.assertRead("/children/SYSTEM/" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/children/SYSTEMGROUP/" + systemGroupUuid.toString(), 1, -1); ITUtilStructureElement.assertExists(Type.SYSTEM, "AA1", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEM, "AA2", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java index d1376ec5..24d1fa8b 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java @@ -261,13 +261,13 @@ class NamesMultipleIT { ITUtilNameElement.assertValidate(nameElements, NameChoice.UPDATE, Boolean.FALSE); ITUtilNameElement.assertValidate(nameElements, NameChoice.DELETE, Boolean.FALSE); - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); createdNameElements = ITUtilNameElement.assertCreate(nameElements); assertNotNull(createdNameElements); assertEquals(9, createdNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("Acc:Cryo-FS-023", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("Acc:Cryo-FS-023", Boolean.FALSE); @@ -323,13 +323,13 @@ class NamesMultipleIT { ITUtilNameElement.assertValidate(nameElements, NameChoice.UPDATE, Boolean.FALSE); ITUtilNameElement.assertValidate(nameElements, NameChoice.DELETE, Boolean.FALSE); - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); createdNameElements = ITUtilNameElement.assertCreate(nameElements); assertNotNull(createdNameElements); assertEquals(9, createdNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ:Cryo-FS-031", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("RFQ:Cryo-FS-031", Boolean.FALSE); @@ -433,13 +433,13 @@ class NamesMultipleIT { ITUtilNameElement.assertValidate(nameElements, NameChoice.UPDATE, Boolean.FALSE); ITUtilNameElement.assertValidate(nameElements, NameChoice.DELETE, Boolean.FALSE); - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); createdNameElements = ITUtilNameElement.assertCreate(nameElements); assertNotNull(createdNameElements); assertEquals(9, createdNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("RFQ", Boolean.FALSE); @@ -469,7 +469,7 @@ class NamesMultipleIT { assertNotNull(updatedNameElements); assertEquals(9, updatedNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("RFQ", Boolean.FALSE); @@ -524,13 +524,13 @@ class NamesMultipleIT { ITUtilNameElement.assertValidate(nameElements, NameChoice.UPDATE, Boolean.FALSE); ITUtilNameElement.assertValidate(nameElements, NameChoice.DELETE, Boolean.FALSE); - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); createdNameElements = ITUtilNameElement.assertCreate(nameElements); assertNotNull(createdNameElements); assertEquals(9, createdNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ:Cryo-FS-051", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("RFQ:Cryo-FS-051", Boolean.FALSE); @@ -642,13 +642,13 @@ class NamesMultipleIT { ITUtilNameElement.assertValidate(nameElements, NameChoice.UPDATE, Boolean.FALSE); ITUtilNameElement.assertValidate(nameElements, NameChoice.DELETE, Boolean.FALSE); - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); createdNameElements = ITUtilNameElement.assertCreate(nameElements); assertNotNull(createdNameElements); assertEquals(9, createdNameElements.length); - assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 9, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ:Cryo-FS-061", Boolean.TRUE); ITUtilNameElement.assertIsLegacy("RFQ:Cryo-FS-061", Boolean.FALSE); @@ -661,7 +661,7 @@ class NamesMultipleIT { assertNotNull(deletedNameElements); assertEquals(9, deletedNameElements.length); - assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilNameElement.assertExists("RFQ:Cryo-FS-061", Boolean.FALSE); ITUtilNameElement.assertIsLegacy("RFQ:Cryo-FS-061", Boolean.FALSE); diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java index c23be18b..0795932b 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java @@ -143,32 +143,32 @@ class StructuresMultipleIT { ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "Sg", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEMGROUP, "SgChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEMGROUP, "Sg", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEMGROUP, "Sg", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEMGROUP, "SgChc", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEM, "Sys", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SYSTEM, "SysChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEM, "Sys", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEM, "Sys", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.SYSTEM, "SysChc", Boolean.TRUE); - ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Sub", Boolean.TRUE); + ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-Sub", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.SUBSYSTEM, "Sys-SubChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.SUBSYSTEM, "Sys-Sub", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.SUBSYSTEM, "Sys-Sub", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.SUBSYSTEM, "Sys-SubChc", Boolean.TRUE); - ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Di", Boolean.TRUE); + ITUtilStructureElement.assertExists(Type.DISCIPLINE, "Di", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DISCIPLINE, "DiChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.DISCIPLINE, "Di", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.DISCIPLINE, "Di", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.DISCIPLINE, "DiChc", Boolean.TRUE); - ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Grp", Boolean.FALSE); + ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "Grp", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICEGROUP, "GrpChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.DEVICEGROUP, "Grp", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.DEVICEGROUP, "Grp", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.DEVICEGROUP, "GrpChc", Boolean.FALSE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-Dt", Boolean.TRUE); ITUtilStructureElement.assertExists(Type.DEVICETYPE, "Di-DtChc", Boolean.FALSE); - ITUtilStructureElement.assertIsValidToCreate(Type.DEVICETYPE, "Di-Dt", Boolean.FALSE); + ITUtilStructureElement.assertIsValidToCreate(Type.DEVICETYPE, "Di-Dt", Boolean.FALSE); ITUtilStructureElement.assertIsValidToCreate(Type.DEVICETYPE, "Di-DtChc", Boolean.TRUE); structureElements = new StructureElementCommand[] { diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresNamesIT.java b/src/test/java/org/openepics/names/docker/complex/StructuresNamesIT.java index cc2b23b1..0fcccb8f 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresNamesIT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresNamesIT.java @@ -83,7 +83,7 @@ class StructuresNamesIT { StructureElement createdStructureElement = null; int nbrNames = -1; - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); structureElement = new StructureElementCommand( null, Type.SYSTEMGROUP, null, @@ -92,9 +92,9 @@ class StructuresNamesIT { createdStructureElement = ITUtilStructureElement.assertCreate(structureElement); systemGroupUuid = createdStructureElement.getUuid(); - assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilStructureElement.assertApprove(createdStructureElement); - assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElement = new StructureElementCommand( null, Type.SYSTEM, systemGroupUuid, @@ -103,9 +103,9 @@ class StructuresNamesIT { createdStructureElement = ITUtilStructureElement.assertCreate(structureElement); systemUuid = createdStructureElement.getUuid(); - assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilStructureElement.assertApprove(createdStructureElement); - assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElement = new StructureElementCommand( null, Type.SUBSYSTEM, systemUuid, @@ -113,9 +113,9 @@ class StructuresNamesIT { "description", "comment"); createdStructureElement = ITUtilStructureElement.assertCreate(structureElement); - assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false").getListSize()); ITUtilStructureElement.assertApprove(createdStructureElement); - assertEquals(nbrNames + 3, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 3, ITUtilNameElement.assertRead("?deleted=false").getListSize()); } @Test @@ -131,7 +131,7 @@ class StructuresNamesIT { StructureElement approvedStructureElement = null; int nbrNames = -1; - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); structureElement = new StructureElementCommand( null, Type.SYSTEMGROUP, null, @@ -140,7 +140,7 @@ class StructuresNamesIT { approvedStructureElement = ITUtilStructureElement.assertCreateApprove(structureElement); systemGroupAcc = approvedStructureElement.getUuid(); - assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 1, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElement = new StructureElementCommand( null, Type.SYSTEM, systemGroupAcc, @@ -149,7 +149,7 @@ class StructuresNamesIT { approvedStructureElement = ITUtilStructureElement.assertCreateApprove(structureElement); systemRFQ = approvedStructureElement.getUuid(); - assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 2, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElements = new StructureElementCommand[] { structureElement = new StructureElementCommand( @@ -168,7 +168,7 @@ class StructuresNamesIT { ITUtilStructureElement.assertCreateApprove(structureElements); - assertEquals(nbrNames + 5, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames + 5, ITUtilNameElement.assertRead("?deleted=false").getListSize()); } @Test @@ -181,7 +181,7 @@ class StructuresNamesIT { StructureElement approvedStructureElement = null; int nbrNames = -1; - nbrNames = ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize(); + nbrNames = ITUtilNameElement.assertRead("?deleted=false").getListSize(); structureElement = new StructureElementCommand( null, Type.DISCIPLINE, null, @@ -190,7 +190,7 @@ class StructuresNamesIT { approvedStructureElement = ITUtilStructureElement.assertCreateApprove(structureElement); disciplineUuid = approvedStructureElement.getUuid(); - assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElement = new StructureElementCommand( null, Type.DEVICEGROUP, disciplineUuid, @@ -199,7 +199,7 @@ class StructuresNamesIT { approvedStructureElement = ITUtilStructureElement.assertCreateApprove(structureElement); deviceGroupUuid = approvedStructureElement.getUuid(); - assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false").getListSize()); structureElement = new StructureElementCommand( null, Type.DEVICETYPE, deviceGroupUuid, @@ -207,7 +207,7 @@ class StructuresNamesIT { "empty", "empty"); approvedStructureElement = ITUtilStructureElement.assertCreateApprove(structureElement); - assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false", -1, -1).getListSize()); + assertEquals(nbrNames, ITUtilNameElement.assertRead("?deleted=false").getListSize()); } } -- GitLab