use of ch.cyberduck.core.features.Home in project cyberduck by iterate-ch.
the class FTPMoveFeatureTest method testMoveOverride.
@Test(expected = AccessDeniedException.class)
public void testMoveOverride() throws Exception {
final Home workdir = new FTPWorkdirService(session);
final Path test = new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
new FTPTouchFeature(session).touch(test, new TransferStatus());
final Path target = new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
new FTPTouchFeature(session).touch(target, new TransferStatus());
new FTPMoveFeature(session).move(test, target, new TransferStatus(), new Delete.DisabledCallback(), new DisabledConnectionCallback());
assertFalse(session.getFeature(Find.class).find(test));
assertTrue(session.getFeature(Find.class).find(target));
new FTPDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
}
use of ch.cyberduck.core.features.Home in project cyberduck by iterate-ch.
the class FTPMoveFeatureTest method testMoveNotFound.
@Test
public void testMoveNotFound() throws Exception {
final Home workdir = new FTPWorkdirService(session);
final Path test = new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
try {
new FTPMoveFeature(session).move(test, new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)), new TransferStatus(), new Delete.DisabledCallback(), new DisabledConnectionCallback());
fail();
} catch (NotfoundException | AccessDeniedException e) {
//
}
}
use of ch.cyberduck.core.features.Home in project cyberduck by iterate-ch.
the class GraphQuotaFeatureTest method testQuotaSimple.
@Test
public void testQuotaSimple() throws BackgroundException {
final Home home = new OneDriveHomeFinderService();
final Quota quota = new GraphQuotaFeature(session, fileid);
Quota.Space space = quota.get();
assertTrue(space.available > 0);
assertTrue(space.used >= 0);
}
Aggregations