use of ch.cyberduck.core.features.Quota in project cyberduck by iterate-ch.
the class LocalQuotaFeatureTest method get.
@Test
public void get() throws Exception {
final LocalSession session = new LocalSession(new Host(new LocalProtocol(), new LocalProtocol().getDefaultHostname()));
session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
session.login(Proxy.DIRECT, new DisabledLoginCallback(), new DisabledCancelCallback());
final Path home = new LocalHomeFinderFeature().find();
final Quota.Space quota = new LocalQuotaFeature(session).get();
assertNotNull(quota.used);
assertNotNull(quota.available);
}
use of ch.cyberduck.core.features.Quota 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);
}
use of ch.cyberduck.core.features.Quota in project cyberduck by iterate-ch.
the class SDSQuotaFeatureTest method testRoom.
@Test
public void testRoom() throws Exception {
final SDSNodeIdProvider nodeid = new SDSNodeIdProvider(session);
final Path room = new SDSDirectoryFeature(session, nodeid).mkdir(new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
final Quota.Space quota = new SDSQuotaFeature(session, nodeid).get();
assertNotNull(quota.available);
assertNotNull(quota.used);
new SDSDeleteFeature(session, nodeid).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
}
Aggregations