Exemple #1
0
 public void testNotPresentWhenDeleting() throws Exception {
   for (String regionId : regions) {
     BulkDeleteResponse deleteResponse =
         getApi().getBulkApi(regionId).bulkDelete(ImmutableList.of(UUID.randomUUID().toString()));
     assertEquals(deleteResponse.getDeleted(), 0);
     assertEquals(deleteResponse.getNotFound(), 1);
     assertTrue(deleteResponse.getErrors().isEmpty());
   }
 }
Exemple #2
0
 @Test(dependsOnMethods = "testExtractArchive")
 public void testBulkDelete() throws Exception {
   for (String regionId : regions) {
     BulkDeleteResponse deleteResponse = getApi().getBulkApi(regionId).bulkDelete(paths);
     assertEquals(deleteResponse.getDeleted(), OBJECT_COUNT);
     assertEquals(deleteResponse.getNotFound(), 0);
     assertTrue(deleteResponse.getErrors().isEmpty());
     assertEquals(
         getApi().getContainerApi(regionId).get(containerName).getObjectCount(), Long.valueOf(0));
   }
 }
 @Override
 public boolean equals(Object object) {
   if (this == object) {
     return true;
   }
   if (object instanceof BulkDeleteResponse) {
     BulkDeleteResponse that = BulkDeleteResponse.class.cast(object);
     return equal(getDeleted(), that.getDeleted())
         && equal(getNotFound(), that.getNotFound())
         && equal(getErrors(), that.getErrors());
   } else {
     return false;
   }
 }