Revision 5291
Added by Matt Jones over 14 years ago
MetacatRestClientTest.java | ||
---|---|---|
268 | 268 |
} |
269 | 269 |
|
270 | 270 |
/** |
271 |
* Test the get() function with a not existing document
|
|
271 |
* Test the get() function with a non existing document
|
|
272 | 272 |
*/ |
273 | 273 |
public void invalidGet() |
274 | 274 |
{ |
... | ... | |
366 | 366 |
m.login(username,password); |
367 | 367 |
|
368 | 368 |
debug("\nFirst insert the document..."); |
369 |
String response = m.putObject(docid + ".1",sr,true);
|
|
369 |
String response = m.create(docid + ".1",sr);
|
|
370 | 370 |
sr.close(); |
371 | 371 |
debug("response:\n"+response); |
372 | 372 |
assertTrue(response.indexOf("success") != -1); |
... | ... | |
375 | 375 |
|
376 | 376 |
sr = new StringReader(emldoc); |
377 | 377 |
debug("\nNow update the document..."); |
378 |
response = m.putObject(docid + ".2",sr,false);
|
|
378 |
response = m.update(docid + ".2",sr);
|
|
379 | 379 |
debug("response:\n"+response); |
380 | 380 |
assertTrue(response.indexOf("success") != -1); |
381 | 381 |
sr.close(); |
... | ... | |
540 | 540 |
String response; |
541 | 541 |
try { |
542 | 542 |
m.login(username,password); |
543 |
response = m.putObject(guid, sr, true);
|
|
543 |
response = m.create(guid, sr);
|
|
544 | 544 |
debug("response:\n"+response); |
545 | 545 |
assertTrue(response.indexOf("success") != -1); |
546 | 546 |
} catch (InsufficientKarmaException e) { |
Also available in: Unified diff
Refactored putObject method to separate the create() and update() portions in order to match the method signatures needed for DataONE.