From acdded8dd7500e38161f45c6c57ec5d907160f95 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Fri, 7 Sep 2012 14:01:36 -0700 Subject: [PATCH] CSPACE-5520: For structured objects XmlReplay tests, created new test groups, added response payloads. --- .../collectionobject-hierarchy.xml | 139 ++++++++++++------ .../hierarchy/res/collectionobject.res.xml | 9 ++ ... => relations-as-object-top-level.res.xml} | 4 +- .../res/relations-pagination-header.res.xml | 5 + ...l => show-all-relations-top-level.res.xml} | 7 +- .../res/show-relations-bottom-level.res.xml | 30 ++++ .../res/show-relations-mid-level.res.xml | 56 +++++++ .../res/show-relations-top-level.res.xml | 54 +++++++ ...xml => show-siblings-bottom-level.res.xml} | 17 ++- ...es.xml => show-siblings-mid-level.res.xml} | 9 +- ...es.xml => show-siblings-top-level.res.xml} | 9 +- 11 files changed, 272 insertions(+), 67 deletions(-) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/collectionobject.res.xml rename services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/{read-as-object-top-level.res.xml => relations-as-object-top-level.res.xml} (94%) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-pagination-header.res.xml rename services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/{read-all-relations.res.xml => show-all-relations-top-level.res.xml} (51%) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-top-level.res.xml rename services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/{read-siblings-bottom-level.res.xml => show-siblings-bottom-level.res.xml} (59%) rename services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/{read-siblings-mid-level.res.xml => show-siblings-mid-level.res.xml} (82%) rename services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/{read-siblings-top-level.res.xml => show-siblings-top-level.res.xml} (58%) 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 da4720e78..0f77af26c 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,6 +1,6 @@ - + @@ -15,10 +15,19 @@ 201 + + GET /cspace-services/collectionobjects/${CreateChessSetBox.CSID} 200 + + + collectionobject/hierarchy/res/collectionobject.res.xml + + ${CreateChessSetBox.objectNumber} + + @@ -129,9 +138,14 @@ 200 --> - - + + + + + + + @@ -156,19 +170,20 @@ 201 - - - - + + + + + + + - - - + + - - - - - + + + + GET /cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true - 200 - - - - - GET - /cspace-services/relations?obj=${CreateChessSetBox.CSID} - 200 - - collectionobject/hierarchy/res/read-as-object-top-level.res.xml + + collectionobject/hierarchy/res/show-relations-top-level.res.xml ${CreateChessSetBox.CSID} ${CreateChessBoard.CSID} @@ -215,23 +220,43 @@ /document/*[local-name()='relations-common-list'] + 200 GET /cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true + + + collectionobject/hierarchy/res/show-relations-mid-level.res.xml + + ${CreateChessSetBox.CSID} + ${CreateBagOfBlackChessPieces.CSID} + ${CreateBlackQueen.CSID} + ${CreateBlackRookWithRelations.CSID} + + /document/*[local-name()='relations-common-list'] + 200 - GET /cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true + + + collectionobject/hierarchy/res/show-relations-bottom-level.res.xml + + ${CreateBagOfBlackChessPieces.CSID} + ${CreateBlackRookWithRelations.CSID} + + /document/*[local-name()='relations-common-list'] + 200 - - + + GET @@ -239,7 +264,7 @@ 200 - collectionobject/hierarchy/res/read-siblings-top-level.res.xml + collectionobject/hierarchy/res/show-siblings-top-level.res.xml /document/*[local-name()='relations-common-list'] @@ -250,7 +275,7 @@ 200 - collectionobject/hierarchy/res/read-siblings-mid-level.res.xml + collectionobject/hierarchy/res/show-siblings-mid-level.res.xml ${CreateChessSetBox.CSID} ${CreateChessBoard.CSID} @@ -262,14 +287,14 @@ GET - /cspace-services/collectionobjects/${CreateBlackQueen.CSID}?showSiblings=true + /cspace-services/collectionobjects/${CreateBlackRook.CSID}?showSiblings=true 200 - collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml + collectionobject/hierarchy/res/show-siblings-bottom-level.res.xml ${CreateBagOfBlackChessPieces.CSID} - ${CreateBlackRook.CSID} + ${CreateBlackQueen.CSID} /document/*[local-name()='relations-common-list'] @@ -283,27 +308,25 @@ 200 - collectionobject/hierarchy/res/read-all-relations.res.xml + collectionobject/hierarchy/res/show-all-relations-top-level.res.xml /document/*[local-name()='relations-common-list'] - + + + + + + - - GET - /cspace-services/relations?sbj=${CreateChessSetBox.CSID} - 200 - - - GET /cspace-services/relations?obj=${CreateChessSetBox.CSID} 200 - - collectionobject/hierarchy/res/read-as-object-top-level.res.xml + + collectionobject/hierarchy/res/relations-as-object-top-level.res.xml ${CreateChessSetBox.CSID} ${CreateChessBoard.CSID} @@ -313,8 +336,29 @@ /document/*[local-name()='relations-common-list'] - + + + + + GET + /cspace-services/relations?sbj=${CreateChessSetBox.CSID} + 200 + + + collectionobject/hierarchy/res/relations-pagination-header.res.xml + + 0 + + + + + + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/collectionobject.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/collectionobject.res.xml new file mode 100644 index 000000000..02b95fdf5 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/collectionobject.res.xml @@ -0,0 +1,9 @@ + + + + + ${objectNumber} + + + \ No newline at end of file diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-as-object-top-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-as-object-top-level.res.xml similarity index 94% rename from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-as-object-top-level.res.xml rename to services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-as-object-top-level.res.xml index dea17357e..8f142791e 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-as-object-top-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-as-object-top-level.res.xml @@ -5,7 +5,7 @@ 1. chess board 2. bag of white chess pieces --> - + 0 3 3 @@ -42,6 +42,6 @@ ${chessSetBoxCSID} - + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-pagination-header.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-pagination-header.res.xml new file mode 100644 index 000000000..f496f896f --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-pagination-header.res.xml @@ -0,0 +1,5 @@ + + + ${totalItems} + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-all-relations.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml similarity index 51% rename from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-all-relations.res.xml rename to services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml index 17f06f674..d09a7189c 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-all-relations.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml @@ -1,6 +1,9 @@ - + + + + - + 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 new file mode 100644 index 000000000..5504221c6 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml @@ -0,0 +1,30 @@ + + + + + + + + 0 + 1 + 1 + + + hasBroader + + ${blackRookCSID} + CollectionObject + + + ${bagOfBlackChessPiecesCSID} + CollectionObject + + + + + + + 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 new file mode 100644 index 000000000..8d145244d --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml @@ -0,0 +1,56 @@ + + + + + + + + 0 + 3 + 3 + + + hasBroader + + ${bagOfBlackChessPiecesCSID} + CollectionObject + + + ${chessSetBoxCSID} + CollectionObject + + + + + hasBroader + + ${blackQueenCSID} + CollectionObject + + + ${bagOfBlackChessPiecesCSID} + CollectionObject + + + + + hasBroader + + ${blackRookCSID} + CollectionObject + + + ${bagOfBlackChessPiecesCSID} + CollectionObject + + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-top-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-top-level.res.xml new file mode 100644 index 000000000..397dfed12 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-top-level.res.xml @@ -0,0 +1,54 @@ + + + + + + + + 0 + 3 + 3 + + + hasBroader + + ${chessBoardCSID} + CollectionObject + + + ${chessSetBoxCSID} + CollectionObject + + + + + hasBroader + + ${bagOfWhiteChessPiecesCSID} + CollectionObject + + + ${chessSetBoxCSID} + CollectionObject + + + + + hasBroader + + ${bagOfBlackChessPiecesCSID} + CollectionObject + + + ${chessSetBoxCSID} + CollectionObject + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-bottom-level.res.xml similarity index 59% rename from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml rename to services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-bottom-level.res.xml index 70d7217a3..1673c1661 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-bottom-level.res.xml @@ -1,26 +1,27 @@ + + + - - - + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-mid-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml similarity index 82% rename from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-mid-level.res.xml rename to services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml index ec997fd8a..9b7e3ac5f 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-mid-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml @@ -1,12 +1,14 @@ + + + - - - + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-top-level.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-top-level.res.xml similarity index 58% rename from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-top-level.res.xml rename to services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-top-level.res.xml index 9a724a693..0120bcb09 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/read-siblings-top-level.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-top-level.res.xml @@ -1,15 +1,16 @@ + + + - - - + -- 2.47.3