// Make sure it's there
List<FilesObject> objects = client.listObjects(containerName);
assertEquals(10, objects.size());
for (int i=0; i < 10; i++) {
FilesObject obj = objects.get(i);
assertEquals("testfile" + i + ".bogus", obj.getName());
assertEquals("application/octet-stream", obj.getMimeType());
}
// Now do a limit
objects = client.listObjects(containerName, 3);
assertEquals(3, objects.size());
for (int i=0; i < 3; i++) {
FilesObject obj = objects.get(i);
assertEquals("testfile" + i + ".bogus", obj.getName());
assertEquals("application/octet-stream", obj.getMimeType());
}
// Now check out a marker
objects = client.listObjects(containerName, 4, "testfile3.bogus");
assertEquals(4, objects.size());
for (int i=0; i < 4; i++) {
FilesObject obj = objects.get(i);
assertEquals("testfile" + (i + 4) + ".bogus", obj.getName());
assertEquals("application/octet-stream", obj.getMimeType());
}
// Clean up
for (int i=0; i < 10; i++) {
client.deleteObject(containerName, "testfile" + i + ".bogus");