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