]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
f3495aa0f862c2aba9cc8fafa79211fc819d0e3f
[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             <expectedCodes>201</expectedCodes>
17         </test>
18         <test ID="ReadChessSetBox" auth="admin@core.collectionspace.org">
19             <method>GET</method>
20             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
21             <expectedCodes>200</expectedCodes>
22         </test>
23         
24          Chess board 
25          (child of chess set box, sibling of bags of white and black chess pieces) 
26         <test ID="CreateChessBoard" auth="admin@core.collectionspace.org">
27             <method>POST</method>
28             <uri>/cspace-services/collectionobjects</uri>
29             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
30             <vars>
31                 <var ID="objectNumber">CSPACE-5518-ChessBoard</var>
32             </vars>
33             <expectedCodes>201</expectedCodes>
34         </test>
35         <test ID="ReadChessBoard" auth="admin@core.collectionspace.org">
36             <method>GET</method>
37             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
38             <expectedCodes>200</expectedCodes>
39         </test>
40         
41          Bags of white and black chess pieces 
42          (child of chess set box, sibling of chess board, parents of chess pieces) 
43         <test ID="CreateBagOfWhiteChessPieces">
44             <method>POST</method>
45             <uri>/cspace-services/collectionobjects</uri>
46             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
47             <vars>
48                 <var ID="objectNumber">CSPACE-5518-BagOfWhiteChessPieces</var>
49             </vars>
50             <expectedCodes>201</expectedCodes>
51         </test>
52         <test ID="ReadBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
53             <method>GET</method>
54             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
55             <expectedCodes>200</expectedCodes>
56         </test>
57         
58         <test ID="CreateBagOfBlackChessPieces">
59             <method>POST</method>
60             <uri>/cspace-services/collectionobjects</uri>
61             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
62             <vars>
63                 <var ID="objectNumber">CSPACE-5518-BagOfBlackChessPieces</var>
64             </vars>
65         </test>
66         <test ID="ReadBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
67             <method>GET</method>
68             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
69             <expectedCodes>200</expectedCodes>
70         </test>
71         
72          Individual chess pieces in those bags 
73         <test ID="CreateWhiteRook">
74             <method>POST</method>
75             <uri>/cspace-services/collectionobjects</uri>
76             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
77             <vars>
78                 <var ID="objectNumber">CSPACE-5518-WhiteRook</var>
79             </vars>
80             <expectedCodes>201</expectedCodes>
81         </test>
82         <test ID="ReadWhiteRook" auth="admin@core.collectionspace.org">
83             <method>GET</method>
84             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
85             <expectedCodes>200</expectedCodes>
86         </test>
87         <test ID="CreateWhiteBishop">
88             <method>POST</method>
89             <uri>/cspace-services/collectionobjects</uri>
90             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
91             <vars>
92                 <var ID="objectNumber">CSPACE-5518-WhiteBishop</var>
93             </vars>
94             <expectedCodes>201</expectedCodes>
95         </test>
96         <test ID="ReadWhiteBishop" auth="admin@core.collectionspace.org">
97             <method>GET</method>
98             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
99             <expectedCodes>200</expectedCodes>
100         </test>
101         <test ID="CreateBlackQueen">
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-BlackQueen</var>
107             </vars>
108             <expectedCodes>201</expectedCodes>
109         </test>
110         <test ID="ReadBlackQueen" auth="admin@core.collectionspace.org">
111             <method>GET</method>
112             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
113             <expectedCodes>200</expectedCodes>
114         </test>
115         
116         <!--
117         <test ID="CreateBlackRook">
118             <method>POST</method>
119             <uri>/cspace-services/collectionobjects</uri>
120             <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
121             <vars>
122                 <var ID="objectNumber">CSPACE-5518-BlackRook</var>
123             </vars>
124             <expectedCodes>201</expectedCodes>
125         </test>
126         <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
127             <method>GET</method>
128             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
129             <expectedCodes>200</expectedCodes>
130         </test>
131         -->
132         
133         <!-- Create hierarchical relationships -->
134        
135         <test ID="CreateBlackRookWithRelations">
136             <method>POST</method>
137             <uri>/cspace-services/collectionobjects</uri>
138             <filename>collectionobject/hierarchy/2-collectionobjects-with-relations-create.xml</filename>
139             <vars>
140                 <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
141                 <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
142                 <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
143                 <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
144                 <var ID="whiteRookCSID">${CreateWhiteRook.CSID}</var>
145                 <var ID="whiteBishopCSID">${CreateWhiteBishop.CSID}</var>
146                 <var ID="blackQueenCSID">${CreateBlackQueen.CSID}</var>
147             </vars>
148             <expectedCodes>201</expectedCodes>
149         </test>
150         <!--
151         <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
152             <method>GET</method>
153             <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}</uri>
154             <expectedCodes>200</expectedCodes>
155         </test>
156         -->
157         
158         <!-- Update one of the chess piece records, while including -->
159         <!-- a list of hierarchical relationships to be created between the -->
160         <!-- various CollectionObjects created in tests above -->
161         
162         <!--
163         <test ID="UpdateBlackRootWithRelations">
164             <method>PUT</method>
165             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
166             <filename>collectionobject/hierarchy/3-collectionobjects-with-relations-update.xml</filename>
167             <vars>
168                 <var ID="distinguishingFeatures">This rook has two light brown striations on part of its base.</var>
169                 <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
170                 <var ID="blackRookCSID">${CreateBlackRookWithRelations.CSID}</var>
171             </vars>
172             <expectedCodes>200</expectedCodes>
173         </test>
174         -->
175         
176     </testGroup>
177     
178     <testGroup ID="HierarchicCollectionObjectMore" autoDeletePOSTS="true">
179         
180         <!-- Read hierarchical relationships -->
181         
182         <!-- Read hierarchical relationships via 'showRelations' -->
183         
184         <test ID="ReadHierarchyForTopLevelItem">
185             <method>GET</method>
186             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true</uri>
187             <expectedCodes>200</expectedCodes>
188             <!-- Also need to test response payload here -->
189         </test>
190         
191         <test ID="GetRelationsAsObjectForTopLevelItem">
192             <method>GET</method>
193             <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
194             <expectedCodes>200</expectedCodes>
195             <response>
196                 <expected level="TEXT" />
197                 <filename>collectionobject/hierarchy/res/read-as-object-top-level.res.xml</filename>
198                 <vars>
199                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
200                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
201                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
202                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
203                 </vars>
204                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
205             </response>
206         </test>
207         
208         <test ID="ReadHierarchyForMidLevelItem">
209             <method>GET</method>
210             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true</uri>
211             <expectedCodes>200</expectedCodes>
212             <!-- Also need to test response payload here -->
213         </test>
214         
215         <test ID="ReadHierarchyForBottomLevelItem">
216             <method>GET</method>
217             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true</uri>
218             <expectedCodes>200</expectedCodes>
219             <!-- Also need to test response payload here -->
220         </test>
221         
222         <!-- Read hierarchical relationships via 'showSiblings' -->
223
224         <test ID="ReadSiblingsForTopLevelItem">
225             <method>GET</method>
226             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
227             <expectedCodes>200</expectedCodes>
228             <response>
229                 <expected level="ADDOK" />
230                 <filename>collectionobject/hierarchy/res/read-siblings-top-level.res.xml</filename>
231                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
232             </response>
233         </test>
234         
235         <test ID="ReadSiblingsForMidLevelItem">
236             <method>GET</method>
237             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
238             <expectedCodes>200</expectedCodes>
239             <response>
240                 <expected level="ADDOK" />
241                 <filename>collectionobject/hierarchy/res/read-siblings-mid-level.res.xml</filename>
242                 <vars>
243                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
244                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
245                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
246                 </vars>
247                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
248             </response>
249         </test>
250         
251         <test ID="ReadSiblingsForBottomLevelItem">
252             <method>GET</method>
253             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}?showSiblings=true</uri>
254             <expectedCodes>200</expectedCodes>
255             <response>
256                 <expected level="ADDOK" />
257                 <filename>collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml</filename>
258                 <vars>
259                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
260                     <var ID="blackRookCSID">${CreateBlackRook.CSID}</var>
261                 </vars>
262                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
263             </response>
264         </test>
265         
266         <!-- Read hierarchical relationships via 'showAllRelations' -->
267
268         <test ID="ReadAllRelationsForTopLevelItem">
269             <method>GET</method>
270             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showAllRelations=true</uri>
271             <expectedCodes>200</expectedCodes>
272             <response>
273                 <expected level="ADDOK" />
274                 <filename>collectionobject/hierarchy/res/read-all-relations.res.xml</filename>
275                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
276             </response>
277         </test>
278         
279         <!-- Read hierarchical relationships via the relations service -->
280
281         <test ID="GetRelationsAsSubjectForTopLevelItem">
282             <method>GET</method>
283             <uri>/cspace-services/relations?sbj=${CreateChessSetBox.CSID}</uri>
284             <expectedCodes>200</expectedCodes>
285             <!-- Also need to test response payload here -->
286         </test>
287          
288         <test ID="GetRelationsAsObjectForTopLevelItem">
289             <method>GET</method>
290             <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
291             <expectedCodes>200</expectedCodes>
292             <response>
293                 <expected level="ADDOK" />
294                 <filename>collectionobject/hierarchy/res/read-as-object-top-level.res.xml</filename>
295                 <vars>
296                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
297                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
298                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
299                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
300                 </vars>
301                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
302             </response>
303         </test>
304        
305         
306         <!-- Cleanup-->
307         
308         <!--
309         <test ID="DeleteHierarchy">
310         </test>
311         -->
312         
313         <!-- The following is likely unnecessary with 'autoDeletePOSTS="true"' -->
314         <!--
315         <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
316             <method>DELETE</method>
317             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
318         </test>
319         <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
320             <method>DELETE</method>
321             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
322         </test>
323         <test ID="DeleteWhiteBishop" auth="admin@core.collectionspace.org">
324             <method>DELETE</method>
325             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
326         </test>
327         <test ID="DeleteWhiteRook" auth="admin@core.collectionspace.org">
328             <method>DELETE</method>
329             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
330         </test>
331         <test ID="DeleteBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
332             <method>DELETE</method>
333             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
334         </test>
335         <test ID="DeleteBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
336             <method>DELETE</method>
337             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
338         </test>
339         <test ID="DeleteChessBoard" auth="admin@core.collectionspace.org">
340             <method>DELETE</method>
341             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
342         </test>
343         <test ID="DeleteChessSetBox" auth="admin@core.collectionspace.org">
344             <method>DELETE</method>
345             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
346         </test>
347         -->
348         
349     </testGroup>
350 </xmlReplay>