]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5120: Updated structured object tests. All are now in a single test group...
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 7 Sep 2012 22:58:08 +0000 (15:58 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 7 Sep 2012 22:58:08 +0000 (15:58 -0700)
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-hierarchy.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-as-object-top-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/relations-pagination-header.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-all-relations-top-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-bottom-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-mid-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-relations-top-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-bottom-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-mid-level.res.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/hierarchy/res/show-siblings-top-level.res.xml

index 0f77af26cf45b6b6121bd1f081faaa1b96a2ace7..23d9212da6d1eb2e9ff5010ff35bef1a91a0906a 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xmlReplay>
-    <testGroup ID="CreateCollectionObjects" autoDeletePOSTS="true">
+    
+    <testGroup ID="CreateCollectionObjects"> <!-- autoDeletePOSTS="true" -->
         
         <!-- Create a set of CollectionObjects -->
         
         </test>
         
         <!--
-        <test ID="CreateBlackRook">
+        <test ID="CreateBlackRookWithRelations">
             <method>POST</method>
             <uri>/cspace-services/collectionobjects</uri>
             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
         </test>
         <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
             <method>GET</method>
-            <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
+            <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}</uri>
             <expectedCodes>200</expectedCodes>
         </test>
         -->
-    </testGroup>
-    
-    <testGroup ID="CreateStructuredObjectsWithHierarchicalRelations" autoDeletePOSTS="true">
        
         <!-- Create a new chess piece, and include in the create payload -->
         <!-- a list of hierarchical relationships to be created between -->
         <!-- the various CollectionObjects previously created, in tests above -->
-    
-        <!-- This test is currently failing with a 400 status code -->
-        <!-- due to one or more Exceptions in RemoteDocumentModelHandlerImpl.updateRelations() -->
-        <!-- ADR 2012-09-06 -->
        
         <!-- Note also that it *might* not be necessary to set these variables; the original -->
         <!-- values of CSIDs saved from previous posts, e.g. {CreateChessSetBox.CSID} -->
             <expectedCodes>200</expectedCodes>
         </test>
         
-    </testGroup>
-    
-    <testGroup ID="UpdateStructuredObjectsWithHierarchicalRelations" autoDeletePOSTS="true">
-        
+        <test ID="ReadHierarchyForTopLevelItem">
+            <method>GET</method>
+            <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true</uri>
+            <response>
+                <expected level="ADDOK" />
+                <filename>collectionobject/hierarchy/res/show-relations-top-level.res.xml</filename>
+                <vars>
+                    <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
+                    <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
+                    <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
+                    <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
+                </vars>
+                <startElement>/document/*[local-name()='relations-common-list']</startElement>
+            </response>
+            <expectedCodes>200</expectedCodes>
+        </test>
+
         <!-- Update one of the existing chess pieces, and add yet one more -->
         <!-- hierarchical relationship, between that piece and another -->
         <!-- existing CollectionObject. -->
         
         <test ID="UpdateBlackRootWithRelations">
             <method>PUT</method>
-            <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
+            <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}</uri>
             <filename>collectionobject/hierarchy/3-collectionobjects-with-relations-update.xml</filename>
             <vars>
                 <var ID="distinguishingFeatures">This rook has two light brown striations on part of its base.</var>
             <expectedCodes>200</expectedCodes>
         </test>
         
-    </testGroup>
     
-    <!-- Read hierarchical relations via the various query parameters now -->
-    <!-- supported for structured objects and procedures -->
-    
-    <testGroup ID="ReadRelationsOnStructuredObjects" autoDeletePOSTS="true">
-                
+        <!-- Read hierarchical relations via the various query parameters now -->
+        <!-- supported for structured objects and procedures -->
+                    
         <!-- Read hierarchical relationships via 'showRelations', -->
         <!-- which returns direct parent and child relations. -->
         
         
         <test ID="ReadHierarchyForBottomLevelItem">
             <method>GET</method>
-            <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true</uri>
+            <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}?showRelations=true</uri>
             <response>
                 <expected level="ADDOK" />
                 <filename>collectionobject/hierarchy/res/show-relations-bottom-level.res.xml</filename>
         
         <test ID="ReadSiblingsForBottomLevelItem">
             <method>GET</method>
-            <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showSiblings=true</uri>
+            <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}?showSiblings=true</uri>
             <expectedCodes>200</expectedCodes>
             <response>
                 <expected level="ADDOK" />
                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
             </response>
         </test>
-        
-    </testGroup>
-    
-    <!-- Read hierarchical relationships via the relations service. -->
-    <!-- (This can also serve as a cross-check on the additional read mechanisms, above.) -->
-        
-    <testGroup ID="ReadRelations" autoDeletePOSTS="true">
-
-        <test ID="GetRelationsAsObjectForTopLevelItem">
+            
+        <!-- Read hierarchical relationships via the relations service. -->
+        <!-- (This can also serve as a cross-check on the additional read mechanisms, above.) -->
+                
+        <!-- Zero (0) total items are expected for the top-level item as a subject, -->
+        <!-- since the tests above created relation records with this top-level -->
+        <!-- solely as an object of those relations. -->
+        <test ID="GetRelationsAsSubjectForTopLevelItem">
             <method>GET</method>
-            <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
+            <uri>/cspace-services/relations?sbj=${CreateChessSetBox.CSID}</uri>
             <expectedCodes>200</expectedCodes>
             <response>
                 <expected level="TEXT" />
-                <filename>collectionobject/hierarchy/res/relations-as-object-top-level.res.xml</filename>
+                <filename>collectionobject/hierarchy/res/relations-pagination-header.res.xml</filename>
                 <vars>
-                    <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
-                    <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
-                    <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
-                    <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
+                    <var ID="totalItems">0</var>
                 </vars>
-                <startElement>/document/*[local-name()='relations-common-list']</startElement>
             </response>
         </test>
         
-        <!-- Zero (0) total items are expected for the top-level item as a subject, -->
-        <!-- since the tests above created relation records with this top-level -->
-        <!-- solely as an object of those relations. -->
-        <test ID="GetRelationsAsSubjectForTopLevelItem">
+        <test ID="GetRelationsAsObjectForTopLevelItem">
             <method>GET</method>
-            <uri>/cspace-services/relations?sbj=${CreateChessSetBox.CSID}</uri>
+            <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
             <expectedCodes>200</expectedCodes>
             <response>
                 <expected level="TEXT" />
-                <filename>collectionobject/hierarchy/res/relations-pagination-header.res.xml</filename>
+                <filename>collectionobject/hierarchy/res/relations-as-object-top-level.res.xml</filename>
                 <vars>
-                    <var ID="totalItems">0</var>
+                    <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
+                    <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
+                    <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
+                    <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
                 </vars>
+                <startElement>/document/*[local-name()='relations-common-list']</startElement>
             </response>
         </test>
         
         <!--
         <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
             <method>DELETE</method>
-            <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
+            <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}</uri>
         </test>
         <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
             <method>DELETE</method>
index 8f142791ee85fcd2dba77b27f73da7fb770e29f4..65906c5e6ca07cab2a652d59dacfa768c76407f8 100644 (file)
@@ -5,7 +5,7 @@
         1. chess board
         2. bag of white chess pieces
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>3</itemsInPage>
         <totalItems>3</totalItems>
index f496f896ffe7191f4ee9e64647bc82e918d315a4..d7b7ee8be6813c5b9dab76f65dd5d92009a41da3 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<ns3:relations-common-list xmlns:ns2="http://collectionspace.org/services/jaxb" xmlns:ns3="http://collectionspace.org/services/relation">
+<ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
     <totalItems>${totalItems}</totalItems>
 </ns3:relations-common-list>
 
index d09a7189cdf4568afa32d94d005d4e7f70bd8057..45a260de3b8b3ab894c9b1cad5a5659ce32028af 100644 (file)
@@ -3,7 +3,7 @@
     <!-- Contents of the specified CollectionObject record itself are -->
     <!-- ignored here; we are interested only in the relations list below. -->
     
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <!-- Need to add expected pagination header elements, relation list items here -->
     </ns3:relations-common-list>
 </document>
index 5504221c6a145ad45a6cff5f8cd0c603e50ffcc1..c42a6efe3fce51780a35cf03e4d3b3aca1d61dad 100644 (file)
@@ -7,7 +7,7 @@
         Parent and child relations of the black rook:
         * bag of black chess pieces (parent)
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>1</itemsInPage>
         <totalItems>1</totalItems>
index 8d145244d66ae83872867d623c9f42ad1363d3a3..685b5b043de2e254e3f2d8d9e19109aac5ebb38b 100644 (file)
@@ -9,7 +9,7 @@
         * black queen (child)
         * black rook (child)
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>3</itemsInPage>
         <totalItems>3</totalItems>
index 397dfed12d5bb8c89b5063397432ad73440e3a12..c88ddff93cb2ea2e5de251e5f2d1b7470f5dbd40 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <document name="collectionobjects">
     <!-- Contents of the specified CollectionObject record itself are -->
     <!-- ignored here; we are interested only in the relations list below. -->
@@ -9,7 +9,7 @@
         * bag of white chess pieces (child)
         * bag of black chess pieces (child)
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>3</itemsInPage>
         <totalItems>3</totalItems>
index 1673c1661aeefecbad4bc9524b6a9b23e8a30c2f..1bcc3bdc6d4fda9cbdee89e4a2cde0d9166b7b08 100644 (file)
@@ -7,7 +7,7 @@
         Siblings of the black rook
         1. black queen
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>1</itemsInPage>
         <totalItems>1</totalItems>
index 9b7e3ac5fdb7039df65d7aa392071c5daaf6261b..3e1f6c3e103486f06ad32e7da8071aa4d700c0fd 100644 (file)
@@ -8,7 +8,7 @@
         1. chess board
         2. bag of white chess pieces
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>2</itemsInPage>
         <totalItems>2</totalItems>
index 0120bcb0999b30759a5ddf05d32fddbe00d26178..037092af7c12f27066182c1892dd7dbc31801a13 100644 (file)
@@ -7,7 +7,7 @@
         Siblings of the chess board box:
         (none)
     -->
-    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns3:relations-common-list xmlns:ns3="http://collectionspace.org/services/relation" xmlns:ns2="http://collectionspace.org/services/jaxb">
         <pageNum>0</pageNum>
         <itemsInPage>0</itemsInPage>
         <totalItems>0</totalItems>