]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
da4720e78c4bd7d1e905a35d87aef0c95bbb63cd
[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         <!-- This test is currently failing with a 400 status code -->
136         <!-- due to one or more Exceptions in RemoteDocumentModelHandlerImpl.updateRelations() -->
137         <!-- ADR 2012-09-06 -->
138        
139         <!-- Note also that it *might* not be necessary to set these variables; the original -->
140         <!-- values of CSIDs saved from previous posts, e.g. {CreateChessSetBox.CSID} -->
141         <!-- might still be available for use in request payloads. -->
142        
143         <test ID="CreateBlackRookWithRelations">
144             <method>POST</method>
145             <uri>/cspace-services/collectionobjects</uri>
146             <filename>collectionobject/hierarchy/2-collectionobjects-with-relations-create.xml</filename>
147             <vars>
148                 <var ID="objectNumber">CSPACE-5518-BlackRook</var>
149                 <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
150                 <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
151                 <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
152                 <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
153                 <var ID="whiteRookCSID">${CreateWhiteRook.CSID}</var>
154                 <var ID="whiteBishopCSID">${CreateWhiteBishop.CSID}</var>
155                 <var ID="blackQueenCSID">${CreateBlackQueen.CSID}</var>
156             </vars>
157             <expectedCodes>201</expectedCodes>
158         </test>
159         <!--
160         <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
161             <method>GET</method>
162             <uri>/cspace-services/collectionobjects/${CreateBlackRookWithRelations.CSID}</uri>
163             <expectedCodes>200</expectedCodes>
164         </test>
165         -->
166         
167         <!-- Update one of the chess piece records, while including -->
168         <!-- a list of hierarchical relationships to be created between the -->
169         <!-- various CollectionObjects created in tests above -->
170         
171         <!--
172         <test ID="UpdateBlackRootWithRelations">
173             <method>PUT</method>
174             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
175             <filename>collectionobject/hierarchy/3-collectionobjects-with-relations-update.xml</filename>
176             <vars>
177                 <var ID="distinguishingFeatures">This rook has two light brown striations on part of its base.</var>
178                 <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
179                 <var ID="blackRookCSID">${CreateBlackRookWithRelations.CSID}</var>
180             </vars>
181             <expectedCodes>200</expectedCodes>
182         </test>
183         -->
184         
185     </testGroup>
186     
187     <!-- Additional tests that we can start moving into the test group above, -->
188     <!-- once create and update tests are succeeding. -->
189     
190     <testGroup ID="HierarchicCollectionObjectMore" autoDeletePOSTS="true">
191         
192         <!-- Read hierarchical relationships -->
193         
194         <!-- Read hierarchical relationships via 'showRelations' -->
195         
196         <test ID="ReadHierarchyForTopLevelItem">
197             <method>GET</method>
198             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true</uri>
199             <expectedCodes>200</expectedCodes>
200             <!-- Also need to test response payload here -->
201         </test>
202         
203         <test ID="GetRelationsAsObjectForTopLevelItem">
204             <method>GET</method>
205             <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
206             <expectedCodes>200</expectedCodes>
207             <response>
208                 <expected level="TEXT" />
209                 <filename>collectionobject/hierarchy/res/read-as-object-top-level.res.xml</filename>
210                 <vars>
211                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
212                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
213                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
214                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
215                 </vars>
216                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
217             </response>
218         </test>
219         
220         <test ID="ReadHierarchyForMidLevelItem">
221             <method>GET</method>
222             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true</uri>
223             <expectedCodes>200</expectedCodes>
224             <!-- Also need to test response payload here -->
225         </test>
226         
227         <test ID="ReadHierarchyForBottomLevelItem">
228             <method>GET</method>
229             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true</uri>
230             <expectedCodes>200</expectedCodes>
231             <!-- Also need to test response payload here -->
232         </test>
233         
234         <!-- Read hierarchical relationships via 'showSiblings' -->
235
236         <test ID="ReadSiblingsForTopLevelItem">
237             <method>GET</method>
238             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
239             <expectedCodes>200</expectedCodes>
240             <response>
241                 <expected level="ADDOK" />
242                 <filename>collectionobject/hierarchy/res/read-siblings-top-level.res.xml</filename>
243                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
244             </response>
245         </test>
246         
247         <test ID="ReadSiblingsForMidLevelItem">
248             <method>GET</method>
249             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showSiblings=true</uri>
250             <expectedCodes>200</expectedCodes>
251             <response>
252                 <expected level="ADDOK" />
253                 <filename>collectionobject/hierarchy/res/read-siblings-mid-level.res.xml</filename>
254                 <vars>
255                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
256                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
257                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
258                 </vars>
259                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
260             </response>
261         </test>
262         
263         <test ID="ReadSiblingsForBottomLevelItem">
264             <method>GET</method>
265             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}?showSiblings=true</uri>
266             <expectedCodes>200</expectedCodes>
267             <response>
268                 <expected level="ADDOK" />
269                 <filename>collectionobject/hierarchy/res/read-siblings-bottom-level.res.xml</filename>
270                 <vars>
271                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
272                     <var ID="blackRookCSID">${CreateBlackRook.CSID}</var>
273                 </vars>
274                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
275             </response>
276         </test>
277         
278         <!-- Read hierarchical relationships via 'showAllRelations' -->
279
280         <test ID="ReadAllRelationsForTopLevelItem">
281             <method>GET</method>
282             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showAllRelations=true</uri>
283             <expectedCodes>200</expectedCodes>
284             <response>
285                 <expected level="ADDOK" />
286                 <filename>collectionobject/hierarchy/res/read-all-relations.res.xml</filename>
287                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
288             </response>
289         </test>
290         
291         <!-- Read hierarchical relationships via the relations service -->
292
293         <test ID="GetRelationsAsSubjectForTopLevelItem">
294             <method>GET</method>
295             <uri>/cspace-services/relations?sbj=${CreateChessSetBox.CSID}</uri>
296             <expectedCodes>200</expectedCodes>
297             <!-- Also need to test response payload here -->
298         </test>
299          
300         <test ID="GetRelationsAsObjectForTopLevelItem">
301             <method>GET</method>
302             <uri>/cspace-services/relations?obj=${CreateChessSetBox.CSID}</uri>
303             <expectedCodes>200</expectedCodes>
304             <response>
305                 <expected level="ADDOK" />
306                 <filename>collectionobject/hierarchy/res/read-as-object-top-level.res.xml</filename>
307                 <vars>
308                     <var ID="chessSetBoxCSID">${CreateChessSetBox.CSID}</var>
309                     <var ID="chessBoardCSID">${CreateChessBoard.CSID}</var>
310                     <var ID="bagOfWhiteChessPiecesCSID">${CreateBagOfWhiteChessPieces.CSID}</var>
311                     <var ID="bagOfBlackChessPiecesCSID">${CreateBagOfBlackChessPieces.CSID}</var>
312                 </vars>
313                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
314             </response>
315         </test>
316        
317         
318         <!-- Cleanup-->
319         
320         <!--
321         <test ID="DeleteHierarchy">
322         </test>
323         -->
324         
325         <!-- The following is likely unnecessary with 'autoDeletePOSTS="true"' -->
326         <!--
327         <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
328             <method>DELETE</method>
329             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
330         </test>
331         <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
332             <method>DELETE</method>
333             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
334         </test>
335         <test ID="DeleteWhiteBishop" auth="admin@core.collectionspace.org">
336             <method>DELETE</method>
337             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
338         </test>
339         <test ID="DeleteWhiteRook" auth="admin@core.collectionspace.org">
340             <method>DELETE</method>
341             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
342         </test>
343         <test ID="DeleteBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
344             <method>DELETE</method>
345             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
346         </test>
347         <test ID="DeleteBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
348             <method>DELETE</method>
349             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
350         </test>
351         <test ID="DeleteChessBoard" auth="admin@core.collectionspace.org">
352             <method>DELETE</method>
353             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
354         </test>
355         <test ID="DeleteChessSetBox" auth="admin@core.collectionspace.org">
356             <method>DELETE</method>
357             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
358         </test>
359         -->
360         
361     </testGroup>
362 </xmlReplay>