use of ch.cyberduck.core.AsciiRandomStringService in project cyberduck by iterate-ch.
the class B2ObjectListServiceTest method testDisplayFolderInBucketMissingPlaceholder.
@Test
public void testDisplayFolderInBucketMissingPlaceholder() throws Exception {
final Path bucket = new Path(String.format("test-%s", new AsciiRandomStringService().random()), EnumSet.of(Path.Type.directory, Path.Type.volume));
final B2VersionIdProvider fileid = new B2VersionIdProvider(session);
new B2DirectoryFeature(session, fileid).mkdir(bucket, new TransferStatus());
final Path folder1 = new Path(bucket, "1-d", EnumSet.of(Path.Type.directory));
final Path file1 = new Path(folder1, "2-f", EnumSet.of(Path.Type.file));
new B2TouchFeature(session, fileid).touch(file1, new TransferStatus());
final AttributedList<Path> list = new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener());
assertEquals(1, list.size());
assertEquals(folder1, list.iterator().next());
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file1), new DisabledLoginCallback(), new Delete.DisabledCallback());
}
Aggregations