From d4174ce7186a6ea47f7977ff09cbfc71e7a75825 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Mon, 10 Sep 2012 19:05:23 -0700 Subject: [PATCH] CSPACE-5122: Added tests for showAllRelations calls for mid-level and bottom-level records in a hierarchy of structured objects. These are currently commented out, as showAllRelations doesn't appear to properly include sibling relationships in its responses. --- .../collectionobject-hierarchy.xml | 73 ++++++++++++++--- .../show-all-relations-bottom-level.res.xml | 40 ++++++++++ .../res/show-all-relations-mid-level.res.xml | 79 +++++++++++++++++++ .../res/show-all-relations-top-level.res.xml | 3 + .../res/show-relations-bottom-level.res.xml | 2 + .../res/show-relations-mid-level.res.xml | 4 + .../res/show-siblings-mid-level.res.xml | 3 + 7 files changed, 192 insertions(+), 12 deletions(-) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-bottom-level.res.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-mid-level.res.xml diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-hierarchy.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-hierarchy.xml index 253074284..7a9c7a0cd 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-hierarchy.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-hierarchy.xml @@ -1,7 +1,7 @@ - + @@ -183,13 +183,20 @@ - - + - + GET /cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true @@ -206,7 +213,7 @@ 200 - + GET /cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true @@ -223,7 +230,7 @@ 200 - + GET /cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true @@ -239,9 +246,9 @@ - + - + GET /cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showSiblings=true 200 @@ -252,7 +259,7 @@ - + GET /cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true 200 @@ -268,7 +275,7 @@ - + GET /cspace-services/collectionobjects/${CreateBlackRook.CSID}?showSiblings=true 200 @@ -283,9 +290,10 @@ - + + - + GET /cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showAllRelations=true 200 @@ -295,6 +303,47 @@ /document/*[local-name()='relations-common-list'] + + + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-bottom-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-bottom-level.res.xml new file mode 100644 index 000000000..52c82419c --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-bottom-level.res.xml @@ -0,0 +1,40 @@ + + + + + + + 0 + 2 + 2 + + + + + hasBroader + + ${whiteBishopCSID} + CollectionObject + + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + + + + + hasBroader + + ${whiteRookCSID} + CollectionObject + + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-mid-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-mid-level.res.xml new file mode 100644 index 000000000..ca32a1a5d --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-mid-level.res.xml @@ -0,0 +1,79 @@ + + + + + + + 0 + 5 + 5 + + + + + hasBroader + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + ${chessSetBoxCSID} + CollectionObject + + + + + + + ${chessBoardCSID} + ${chessSetBoxCSID} + hasBroader + + ${chessBoardCSID} + + + ${chessSetBoxCSID} + + + + + ${bagOfBlackChessPiecesCSID} + ${chessSetBoxCSID} + hasBroader + + ${bagOfBlackChessPiecesCSID} + + + ${chessSetBoxCSID} + + + + + + + hasBroader + + ${whiteBishopCSID} + CollectionObject + + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + + + hasBroader + + ${whiteRookCSID} + CollectionObject + + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml index ff05e1748..12c979ff6 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml @@ -8,6 +8,8 @@ 3 3 + + hasBroader @@ -43,5 +45,6 @@ CollectionObject + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml index c42a6efe3..82d417c3a 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml @@ -12,6 +12,8 @@ 1 1 + + hasBroader diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml index 685b5b043..40f76efa3 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml @@ -14,6 +14,8 @@ 3 3 + + hasBroader @@ -26,6 +28,8 @@ + + hasBroader diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml index 3e1f6c3e1..a488806da 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml @@ -12,6 +12,7 @@ 0 2 2 + ${chessBoardCSID} ${chessSetBoxCSID} @@ -23,6 +24,7 @@ ${chessSetBoxCSID} + ${bagOfWhiteChessPiecesCSID} ${chessSetBoxCSID} @@ -34,6 +36,7 @@ ${chessSetBoxCSID} + -- 2.47.3