]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
ab5d6ff30032fb0d351b27ea7858671369f21a7b
[tmp/jakarta-migration.git] /
1 <?xml version="1.0" encoding="UTF-8"?>
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         <test ID="ReadHierarchyForTopLevelItem">
138             <method>GET</method>
139             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}?showRelations=true</uri>
140             <!-- Need to test response payload here -->
141         </test>
142         
143         <test ID="ReadHierarchyForMidLevelItem">
144             <method>GET</method>
145             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}?showRelations=true</uri>
146             <!-- Need to test response payload here -->
147         </test>
148         
149         <test ID="ReadHierarchyForBottomLevelItem">
150             <method>GET</method>
151             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}?showRelations=true</uri>
152             <!-- Need to test response payload here -->
153         </test>
154         
155         <test ID="ReadAllRelations">
156              <method>GET</method>
157              <uri>/cspace-services/relations</uri>
158              <!-- Need to test response payload here -->
159          </test>
160          
161          <test ID="GetRelationsAsSubject">
162              <method>GET</method>
163              <uri>/cspace-services/relations?sbj=${CreateBagOfBlackChessPieces.CSID}</uri>
164              <!-- Need to test response payload here -->
165         </test>
166          
167         <test ID="GetRelationsAsObject">
168             <method>GET</method>
169             <uri>/cspace-services/relations?obj=${CreateBagOfBlackChessPieces.CSID}</uri>
170             <!-- Need to test response payload here -->
171        </test>
172             
173         
174         <!-- Cleanup-->
175         <!--
176         <test ID="DeleteHierarchy">
177         </test>
178         -->
179         <!-- The following is likely unnecessary with 'autoDeletePOSTS="true"' -->
180         <!--
181         <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
182             <method>DELETE</method>
183             <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
184         </test>
185         <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
186             <method>DELETE</method>
187             <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
188         </test>
189         <test ID="DeleteWhiteBishop" auth="admin@core.collectionspace.org">
190             <method>DELETE</method>
191             <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
192         </test>
193         <test ID="DeleteWhiteRook" auth="admin@core.collectionspace.org">
194             <method>DELETE</method>
195             <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
196         </test>
197         <test ID="DeleteBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
198             <method>DELETE</method>
199             <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
200         </test>
201         <test ID="DeleteBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
202             <method>DELETE</method>
203             <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
204         </test>
205         <test ID="DeleteChessBoard" auth="admin@core.collectionspace.org">
206             <method>DELETE</method>
207             <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
208         </test>
209         <test ID="DeleteChessSetBox" auth="admin@core.collectionspace.org">
210             <method>DELETE</method>
211             <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
212         </test>
213         -->
214         
215         
216         
217         
218         <!--
219         <test ID="LocationChild3">
220             <method>POST</method>
221             <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/</uri>
222             <filename>collectionobject/hierarchy/2-item.xml</filename>
223             <vars>
224                 <var ID="inAuthority">${LocationAuth1.CSID}</var>
225                 <var ID="authShortIdentifier">CSPACE3739LocationAuthority</var>
226                 <var ID="shortIdentifier">Shelf3</var>
227                 <var ID="name">Shelf 3</var>
228             </vars>
229         </test>
230         
231         <test ID="LocationParent">
232             <method>POST</method>
233             <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
234             <filename>collectionobject/hierarchy/2-item.xml</filename>
235             <vars>
236                 <var ID="inAuthority">${LocationAuth1.CSID}</var>
237                 <var ID="authShortIdentifier">CSPACE3739LocationAuthority</var>
238                 <var ID="shortIdentifier">Aisle3</var>
239                 <var ID="name">Aisle 3</var>
240             </vars>
241         </test>
242
243                 <test ID="Location1_old">
244             <method>POST</method>
245             <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
246             <filename>collectionobject/hierarchy/3-locations_w_relations_CSID.xml</filename>
247             <vars>
248                             <var ID="name">Cabinet 1</var>
249                 <var ID="parentCSID">${LocationParent.CSID}</var>
250                 <var ID="childCSID">${LocationChild1.CSID}</var>
251                 <var ID="child2CSID">${LocationChild2.CSID}</var>
252                 <var ID="child3CSID">${LocationChild3.CSID}</var>
253             </vars>
254         </test>
255         
256         <test ID="Location1">
257             <method>POST</method>
258             <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
259             <filename>collectionobject/hierarchy/5-locations_w_relations_RefNames.xml</filename>
260             <vars>
261                 <var ID="shortIdentifier">Cabinet1a</var>
262                             <var ID="name">Cabinet 1a</var>
263                 <var ID="childCSID">${LocationChild1.CSID}</var>
264                 <var ID="child2CSID">${LocationChild2.CSID}</var>
265                 <var ID="child3CSID">${LocationChild3.CSID}</var>
266             </vars>
267         </test>
268         
269         <test ID="GetLocation">
270             <method>GET</method>
271             <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${Location1.CSID}?showRelations=true</uri>
272         </test>
273         
274         -->
275         
276         <!-- NOTE: item  on url is .../items/${LocationChild1.CSID} so this looks for
277                    siblings of Child1, which would be child2 and child3.
278         -->
279         
280         <!--
281         <test ID="Get_siblings">
282             <method>GET</method>
283             <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${LocationChild1.CSID}?showSiblings=true</uri>
284             <response>
285                 <expected level="ADDOK" />
286                 <filename>collectionobject/hierarchy/res/Get_siblings.res.xml</filename>
287                 <vars>
288                     <var ID="locationCSID">${Location1.CSID}</var>
289                     <var ID="child1CSID">${LocationChild1.CSID}</var>
290                     <var ID="child2CSID">${LocationChild2.CSID}</var>
291                 </vars>
292                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
293          </response>
294         </test>
295         -->
296         <!--
297         <test ID="Get_allRelations">
298             <method>GET</method>
299             <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${Location1.CSID}?showAllRelations=true</uri>
300             <response>
301                 <expected level="ADDOK" />
302                 <filename>collectionobject/hierarchy/res/Get_allRelations.res.xml</filename>
303         -->
304                 <!-- NOTE: vars are referenced in showAllRelations.res.xml
305                      from tests in this test group, e.g. 
306                      LocationParent.CSID :: ${LocationParent.CSID} 
307                      These vars are all in the expression context while this group is active,
308                      because we hang onto all ServiceResult objects for the duration of the group,
309                      and ServiceObjects keep their vars.
310                 -->
311          <!--
312
313                 <startElement>/document/*[local-name()='relations-common-list']</startElement>
314              </response>
315              
316         </test>
317          -->
318          <!--
319          <test ID="relationsGET">
320              <method>GET</method>
321              <uri>/cspace-services/relations/</uri>
322          </test>
323          
324          <test ID="relations_sbj">
325              <method>GET</method>
326              <uri>/cspace-services/relations?sbj=${Location1.CSID}</uri>
327          </test>
328          
329         <test ID="relations_obj">
330             <method>GET</method>
331             <uri>/cspace-services/relations?obj=${Location1.CSID}</uri>
332         </test>
333         -->
334         
335     </testGroup>
336 </xmlReplay>