Revision 4212
Added by daigle almost 16 years ago
MetaCatServletNetTest.java | ||
---|---|---|
178 | 178 |
* Test insert a xml document successfully |
179 | 179 |
*/ |
180 | 180 |
public void testInsertXMLDocument() throws PropertyNotFoundException { |
181 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
182 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
181 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
182 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
183 | 183 |
logMetacat.info("insert docid: " + name); |
184 | 184 |
String content = "<?xml version=\"1.0\"?>" |
185 | 185 |
+ "<!DOCTYPE acl PUBLIC \"-//ecoinformatics.org//" |
... | ... | |
201 | 201 |
* In the String, there is no <!Doctype ... Public/System/> |
202 | 202 |
*/ |
203 | 203 |
public void testInsertInvalidateXMLDocument() throws PropertyNotFoundException { |
204 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
205 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
204 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
205 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
206 | 206 |
logMetacat.info("insert docid: " + name); |
207 | 207 |
String content = "<?xml version=\"1.0\"?>" |
208 | 208 |
+ "<acl authSystem=\"knb\" order=\"allowFirst\">" + "<identifier>" + name |
... | ... | |
220 | 220 |
* There is no </acl> in this string |
221 | 221 |
*/ |
222 | 222 |
public void testInsertNonWellFormedXMLDocument() throws PropertyNotFoundException { |
223 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
224 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
223 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
224 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
225 | 225 |
logMetacat.info("insert non well-formed docid: " + name); |
226 | 226 |
String content = "<?xml version=\"1.0\"?>" |
227 | 227 |
+ "<acl authSystem=\"knb\" order=\"allowFirst\">" + "<identifier>" + name |
... | ... | |
239 | 239 |
* Test read a xml document in xml format successfully |
240 | 240 |
*/ |
241 | 241 |
public void testReadXMLDocumentXMLFormat() throws PropertyNotFoundException { |
242 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
243 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
242 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
243 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
244 | 244 |
assertTrue(handleReadAction(name, "xml")); |
245 | 245 |
|
246 | 246 |
} |
... | ... | |
249 | 249 |
* Test read a xml document in html format successfully |
250 | 250 |
*/ |
251 | 251 |
public void testReadXMLDocumentHTMLFormat() throws PropertyNotFoundException { |
252 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
253 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
252 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
253 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
254 | 254 |
assertTrue(handleReadAction(name, "html")); |
255 | 255 |
|
256 | 256 |
} |
... | ... | |
259 | 259 |
* Test read a xml document in zip format successfully |
260 | 260 |
*/ |
261 | 261 |
public void testReadXMLDocumentZipFormat() throws PropertyNotFoundException { |
262 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
263 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
262 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
263 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
264 | 264 |
assertTrue(handleReadAction(name, "zip")); |
265 | 265 |
|
266 | 266 |
} |
... | ... | |
269 | 269 |
* Test insert a xml document successfully |
270 | 270 |
*/ |
271 | 271 |
public void testUpdateXMLDocument() throws PropertyNotFoundException { |
272 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
273 |
+ PropertyService.getProperty("accNumSeparator") + "2"; |
|
272 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
273 |
+ PropertyService.getProperty("document.accNumSeparator") + "2";
|
|
274 | 274 |
logMetacat.info("update docid: " + name); |
275 | 275 |
String content = "<?xml version=\"1.0\"?>" |
276 | 276 |
+ "<!DOCTYPE acl PUBLIC \"-//ecoinformatics.org//" |
... | ... | |
291 | 291 |
* Test insert a data file successfully |
292 | 292 |
*/ |
293 | 293 |
public void testInertDataFile() throws PropertyNotFoundException { |
294 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
295 |
+ PropertyService.getProperty("accNumSeparator") + "1"; |
|
294 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
295 |
+ PropertyService.getProperty("document.accNumSeparator") + "1";
|
|
296 | 296 |
logMetacat.info("insert data file docid: " + name); |
297 | 297 |
logMetacat.info("insert data file "); |
298 | 298 |
File hello = new File("test/jones.204.22.xml"); |
... | ... | |
304 | 304 |
* Test delete a xml document successfully |
305 | 305 |
*/ |
306 | 306 |
public void testDeleteXMLDocument() throws PropertyNotFoundException { |
307 |
String name = "john" + PropertyService.getProperty("accNumSeparator") + serialNumber |
|
308 |
+ PropertyService.getProperty("accNumSeparator") + "2"; |
|
307 |
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
|
|
308 |
+ PropertyService.getProperty("document.accNumSeparator") + "2";
|
|
309 | 309 |
logMetacat.info("delete docid: " + name); |
310 | 310 |
assertTrue(handleDeleteFile(name)); |
311 | 311 |
|
Also available in: Unified diff
Continue to qualify property names