]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
4a4cb5a581edc8cbbce2d71a9ebe1734b87eb352
[tmp/jakarta-migration.git] /
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <xmlReplay>
3     <testGroup ID="HierarchicCollectionObject" autoDeletePOSTS="true">
4         
5         <!-- Create a set of CollectionObjects -->
6         
7         <!-- Chess set box -->
8         <!-- (parent of chess board, bags of white and black chess pieces -->
9         <test ID="CreateChessSetBox" auth="admin@core.collectionspace.org">
10             <method>POST</method>
11             <uri>/cspace-services/collectionobjects</uri>
12             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
13             <vars>
14                 <var ID="objectNumber">CSPACE-5518-ChessSetBox</var>
15             </vars>
16         </test>
17         <test ID="ReadChessSetBox" auth="admin@core.collectionspace.org">
18             <method>GET</method>
19             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
20         </test>
21         
22         <!-- Chess board -->
23         <!-- (child of chess set box, sibling of bags of white and black chess pieces) -->
24         <test ID="CreateChessBoard" auth="admin@core.collectionspace.org">
25             <method>POST</method>
26             <uri>/cspace-services/collectionobjects</uri>
27             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
28             <vars>
29                 <var ID="objectNumber">CSPACE-5518-ChessBoard</var>
30             </vars>
31         </test>
32         <test ID="ReadChessBoard" auth="admin@core.collectionspace.org">
33             <method>GET</method>
34             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
35         </test>
36         
37         <!-- Bags of white and black chess pieces -->
38         <!-- (child of chess set box, sibling of chess board, parents of chess pieces) -->
39         <test ID="CreateBagOfWhiteChessPieces">
40             <method>POST</method>
41             <uri>/cspace-services/collectionobjects</uri>
42             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
43             <vars>
44                 <var ID="objectNumber">CSPACE-5518-BagOfWhiteChessPieces</var>
45             </vars>
46         </test>
47         <test ID="ReadBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
48             <method>GET</method>
49             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
50         </test>
51         <test ID="CreateBagOfBlackChessPieces">
52             <method>POST</method>
53             <uri>/cspace-services/collectionobjects</uri>
54             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
55             <vars>
56                 <var ID="objectNumber">CSPACE-5518-BagOfBlackChessPieces</var>
57             </vars>
58         </test>
59         <test ID="ReadBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
60             <method>GET</method>
61             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
62         </test>
63         
64         <!-- Individual chess pieces in those bags -->
65         <test ID="CreateWhiteRook">
66             <method>POST</method>
67             <uri>/cspace-services/collectionobjects</uri>
68             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
69             <vars>
70                 <var ID="objectNumber">CSPACE-5518-WhiteRook</var>
71             </vars>
72         </test>
73         <test ID="ReadWhiteRook" auth="admin@core.collectionspace.org">
74             <method>GET</method>
75             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
76         </test>
77         <test ID="CreateWhiteBishop">
78             <method>POST</method>
79             <uri>/cspace-services/collectionobjects</uri>
80             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
81             <vars>
82                 <var ID="objectNumber">CSPACE-5518-WhiteBishop</var>
83             </vars>
84         </test>
85         <test ID="ReadWhiteBishop" auth="admin@core.collectionspace.org">
86             <method>GET</method>
87             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
88         </test>
89        <test ID="CreateBlackQueen">
90             <method>POST</method>
91             <uri>/cspace-services/collectionobjects</uri>
92             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
93             <vars>
94                 <var ID="objectNumber">CSPACE-5518-BlackQueen</var>
95             </vars>
96         </test>
97         <test ID="ReadBlackQueen" auth="admin@core.collectionspace.org">
98             <method>GET</method>
99             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
100         </test>  
101         <test ID="CreateBlackRook">
102             <method>POST</method>
103             <uri>/cspace-services/collectionobjects</uri>
104             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
105             <vars>
106                 <var ID="objectNumber">CSPACE-5518-BlackRook</var>
107             </vars>
108         </test>
109         <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
110             <method>GET</method>
111             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
112         </test>
113         
114         <!-- Create hierarchical relationships -->
115         
116         <!-- Post an update to one of the chess piece records, which includes -->
117         <!-- a list of hierarchical relationships to be created between the -->
118         <!-- various CollectionObjects created in tests above -->
119         <test ID="CreateHierarchy">
120             <method>PUT</method>
121             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
122             <filename>collectionobject/hierarchy/2-collectionobjects_w_relations_CSID.xml</filename>
123             <vars>
124                 <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
125                 <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
126                 <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
127                 <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
128                 <var ID="whiteRookCSID">${CreateWhiteRook.CSID}</var>
129                 <var ID="whiteBishopCSID">${CreateWhiteBishop.CSID}</var>
130                 <var ID="blackQueenCSID">${CreateBlackQueen.CSID}</var>
131                 <var ID="blackRookCSID">${CreateBlackRook.CSID}</var>
132             </vars>
133         </test>
134         
135         <!-- Read hierarchical relationships -->
136         
137         <!-- Read hierarchical relationships via 'showRelations' -->
138         
139         <test ID="ReadHierarchyForTopLevelItem">
140             <method>GET</method>
141             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true</uri>
142             <!-- Also need to test response payload here -->
143         </test>
144         
145         <test ID="ReadHierarchyForMidLevelItem">
146             <method>GET</method>
147             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true</uri>
148             <!-- Also need to test response payload here -->
149         </test>
150         
151         <test ID="ReadHierarchyForBottomLevelItem">
152             <method>GET</method>
153             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true</uri>
154             <!-- Also need to test response payload here -->
155         </test>
156         
157         <!-- Read hierarchical relationships via 'showSiblings' -->
158
159         <test ID="ReadSiblingsForTopLevelItem">
160             <method>GET</method>
161             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
162             <response>
163                 <expected level="ADDOK" />
164                 <filename>collectionobject/hierarchy/res/read-siblings-top-level.res.xml</filename>
165                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
166             </response>
167         </test>
168         
169         <test ID="ReadSiblingsForMidLevelItem">
170             <method>GET</method>
171             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
172             <response>
173                 <expected level="ADDOK" />
174                 <filename>collectionobject/hierarchy/res/read-siblings-mid-level.res.xml</filename>
175                 <vars>
176                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
177                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
178                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
179                 </vars>
180                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
181             </response>
182         </test>
183         
184         <test ID="ReadSiblingsForBottomLevelItem">
185             <method>GET</method>
186             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}?showSiblings=true</uri>
187             <response>
188                 <expected level="ADDOK" />
189                 <filename>collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml</filename>
190                 <vars>
191                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
192                     <var ID="blackRookCSID">${CreateBlackRook.CSID}</var>
193                 </vars>
194                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
195             </response>
196         </test>
197         
198         <!-- Read hierarchical relationships via 'showAllRelations' -->
199
200         <test ID="ReadAllRelationsForTopLevelItem">
201             <method>GET</method>
202             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showAllRelations=true</uri>
203             <response>
204                 <expected level="ADDOK" />
205                 <filename>collectionobject/hierarchy/res/read-all-relations.res.xml</filename>
206                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
207              </response>
208              
209         </test>
210         
211         <!-- Read hierarchical relationships via the relations service -->
212
213         <test ID="GetRelationsAsSubject">
214              <method>GET</method>
215              <uri>/cspace-services/relations?sbj=${CreateBagOfBlackChessPieces.CSID}</uri>
216              <!-- Also need to test response payload here -->
217         </test>
218          
219         <test ID="GetRelationsAsObject">
220             <method>GET</method>
221             <uri>/cspace-services/relations?obj=${CreateBagOfBlackChessPieces.CSID}</uri>
222             <!-- Also need to test response payload here -->
223         </test>
224        
225         
226         <!-- Cleanup-->
227         
228         <!--
229         <test ID="DeleteHierarchy">
230         </test>
231         -->
232         
233         <!-- The following is likely unnecessary with 'autoDeletePOSTS="true"' -->
234         <!--
235         <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
236             <method>DELETE</method>
237             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
238         </test>
239         <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
240             <method>DELETE</method>
241             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
242         </test>
243         <test ID="DeleteWhiteBishop" auth="admin@core.collectionspace.org">
244             <method>DELETE</method>
245             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
246         </test>
247         <test ID="DeleteWhiteRook" auth="admin@core.collectionspace.org">
248             <method>DELETE</method>
249             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
250         </test>
251         <test ID="DeleteBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
252             <method>DELETE</method>
253             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
254         </test>
255         <test ID="DeleteBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
256             <method>DELETE</method>
257             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
258         </test>
259         <test ID="DeleteChessBoard" auth="admin@core.collectionspace.org">
260             <method>DELETE</method>
261             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
262         </test>
263         <test ID="DeleteChessSetBox" auth="admin@core.collectionspace.org">
264             <method>DELETE</method>
265             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
266         </test>
267         -->
268         
269     </testGroup>
270 </xmlReplay>