mirror of
https://github.com/iterate-ch/cyberduck.git
synced 2026-05-26 19:10:49 +00:00
Use singleton noop instance.
This commit is contained in:
@@ -15,8 +15,8 @@ package ch.cyberduck.core.azure;/*
|
||||
|
||||
import ch.cyberduck.core.Credentials;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.LoginConnectionService;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.cryptomator.CryptoVault;
|
||||
@@ -50,7 +50,7 @@ public class AbstractAzureTest extends VaultTest {
|
||||
PROPERTIES.get("azure.user")
|
||||
));
|
||||
session = new AzureSession(host);
|
||||
new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(),
|
||||
new LoginConnectionService(LoginCallback.noop, new DisabledHostKeyCallback(),
|
||||
new TestPasswordStore(), ProgressListener.noop).check(session, CancelCallback.noop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AsciiRandomStringService;
|
||||
import ch.cyberduck.core.DefaultPathPredicate;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -52,7 +52,7 @@ public class AzureAttributesFinderFeatureTest extends AbstractAzureTest {
|
||||
assertEquals("d41d8cd98f00b204e9800998ecf8427e", attributes.getChecksum().hash);
|
||||
assertNotNull(attributes.getETag());
|
||||
assertEquals(attributes.getETag(), new DefaultAttributesFinderFeature(session).find(test).getETag());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -64,7 +64,7 @@ public class AzureAttributesFinderFeatureTest extends AbstractAzureTest {
|
||||
assertNotEquals(PathAttributes.EMPTY, attributes);
|
||||
assertNotNull(attributes.getETag());
|
||||
assertEquals(attributes.getETag(), new DefaultAttributesFinderFeature(session).find(container).getETag());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -82,7 +82,7 @@ public class AzureAttributesFinderFeatureTest extends AbstractAzureTest {
|
||||
assertNotEquals(PathAttributes.EMPTY, attributes);
|
||||
assertNotNull(attributes.getETag());
|
||||
assertNotNull(new AzureObjectListService(session).list(directory, new DisabledListProgressListener()).find(new DefaultPathPredicate(test)));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertNotNull(new AzureObjectListService(session).list(directory, new DisabledListProgressListener()).find(new DefaultPathPredicate(test)));
|
||||
// Still found as prefix
|
||||
assertNotNull(new AzureObjectListService(session).list(container, new DisabledListProgressListener()).find(new DefaultPathPredicate(intermediate)));
|
||||
@@ -90,7 +90,7 @@ public class AzureAttributesFinderFeatureTest extends AbstractAzureTest {
|
||||
// Ignore 404 failures
|
||||
assertSame(PathAttributes.EMPTY, new AzureAttributesFinderFeature(session).find(directory));
|
||||
assertSame(PathAttributes.EMPTY, new AzureAttributesFinderFeature(session).find(intermediate));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.UnsupportedException;
|
||||
@@ -51,7 +51,7 @@ public class AzureCopyFeatureTest extends AbstractAzureTest {
|
||||
final PathAttributes sourceAttr = new AzureAttributesFinderFeature(session).find(test);
|
||||
final PathAttributes copyAttr = new AzureAttributesFinderFeature(session).find(copy);
|
||||
assertNotEquals(sourceAttr.getETag(), copyAttr.getETag());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -71,6 +71,6 @@ public class AzureCopyFeatureTest extends AbstractAzureTest {
|
||||
final Find find = new DefaultFindFeature(session);
|
||||
assertTrue(find.find(test));
|
||||
assertTrue(find.find(copy));
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AsciiRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -25,14 +25,14 @@ public class AzureDeleteFeatureTest extends AbstractAzureTest {
|
||||
@Test(expected = NotfoundException.class)
|
||||
public void testDeleteNotFoundBucket() throws Exception {
|
||||
final Path container = new Path(new AsciiRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
public void testDeleteNotFoundKey() throws Exception {
|
||||
final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
|
||||
final Path test = new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -40,7 +40,7 @@ public class AzureDeleteFeatureTest extends AbstractAzureTest {
|
||||
final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
|
||||
final Path test = new AzureDirectoryFeature(session).mkdir(new AzureWriteFeature(session), new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(new AzureFindFeature(session).find(test));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new AzureFindFeature(session).find(test));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class AzureDeleteFeatureTest extends AbstractAzureTest {
|
||||
final Path test = new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new AzureTouchFeature(session).touch(new AzureWriteFeature(session), test, new TransferStatus());
|
||||
assertTrue(new AzureFindFeature(session).find(test));
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(container, test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(container, test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new AzureFindFeature(session).find(test));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.ConflictException;
|
||||
@@ -30,7 +30,7 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
|
||||
assertEquals(PathAttributes.EMPTY, container.attributes());
|
||||
assertThrows(ConflictException.class, () -> feature.mkdir(new AzureWriteFeature(session), container, new TransferStatus()));
|
||||
new AzureTouchFeature(session).touch(new AzureWriteFeature(session), new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new AzureFindFeature(session).find(container));
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
|
||||
assertThrows(InvalidFilenameException.class, () -> feature.preflight(container.getParent(), container.getName()));
|
||||
feature.mkdir(new AzureWriteFeature(session), container, new TransferStatus());
|
||||
assertTrue(new AzureFindFeature(session).find(container));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new AzureFindFeature(session).find(container));
|
||||
}
|
||||
|
||||
@@ -56,10 +56,10 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
|
||||
assertEquals(PathAttributes.EMPTY, placeholder.attributes());
|
||||
final Path file = new Path(placeholder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new AzureTouchFeature(session).touch(new AzureWriteFeature(session), file, new TransferStatus());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(placeholder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(placeholder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
// Still find common prefix
|
||||
assertTrue(new AzureFindFeature(session).find(placeholder));
|
||||
assertEquals(PathAttributes.EMPTY, new AzureAttributesFinderFeature(session).find(placeholder));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AsciiRandomStringService;
|
||||
import ch.cyberduck.core.CachingFindFeature;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -57,7 +57,7 @@ public class AzureFindFeatureTest extends AbstractAzureTest {
|
||||
new AzureWriteFeature(session), new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(new AzureFindFeature(session).find(folder));
|
||||
assertFalse(new AzureFindFeature(session).find(new Path(folder.getAbsolute(), EnumSet.of(Path.Type.file))));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,7 +67,7 @@ public class AzureFindFeatureTest extends AbstractAzureTest {
|
||||
new AzureTouchFeature(session).touch(new AzureWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(new AzureFindFeature(session).find(file));
|
||||
assertFalse(new AzureFindFeature(session).find(new Path(file.getAbsolute(), EnumSet.of(Path.Type.directory))));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -84,7 +84,7 @@ public class AzureFindFeatureTest extends AbstractAzureTest {
|
||||
assertTrue(new AzureFindFeature(session).find(new Path(container, prefix, EnumSet.of(Path.Type.directory, Path.Type.placeholder))));
|
||||
assertTrue(new AzureObjectListService(session).list(intermediate,
|
||||
new DisabledListProgressListener()).contains(test));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new AzureFindFeature(session).find(test));
|
||||
assertFalse(new AzureFindFeature(session).find(intermediate));
|
||||
final PathCache cache = new PathCache(1);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.transfer.TransferStatus;
|
||||
@@ -30,7 +30,7 @@ public class AzureMetadataFeatureTest extends AbstractAzureTest {
|
||||
assertFalse(metadata.isEmpty());
|
||||
assertTrue(metadata.containsKey("Test"));
|
||||
assertEquals(v, metadata.get("Test"));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -44,6 +44,6 @@ public class AzureMetadataFeatureTest extends AbstractAzureTest {
|
||||
assertFalse(metadata.isEmpty());
|
||||
assertTrue(metadata.containsKey("Cache-Control"));
|
||||
assertEquals("public, max-age=0", metadata.get("Cache-Control"));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -34,7 +34,7 @@ public class AzureMoveFeatureTest extends AbstractAzureTest {
|
||||
assertTrue(new AzureFindFeature(session).find(target));
|
||||
final PathAttributes targetAttr = new AzureAttributesFinderFeature(session).find(target);
|
||||
assertEquals(Comparison.equal, session.getHost().getProtocol().getFeature(ComparisonService.class).compare(Path.Type.file, sourceAttr, targetAttr));
|
||||
new AzureDeleteFeature(session).delete(Collections.<Path>singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.<Path>singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3,8 +3,8 @@ package ch.cyberduck.core.azure;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.IndexedListProgressListener;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -46,7 +46,7 @@ public class AzureObjectListServiceTest extends AbstractAzureTest {
|
||||
}
|
||||
}).isEmpty());
|
||||
assertTrue(callback.get());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
@@ -69,7 +69,7 @@ public class AzureObjectListServiceTest extends AbstractAzureTest {
|
||||
final PathAttributes attributes = list.get(0).attributes();
|
||||
assertEquals(attributes, new AzureAttributesFinderFeature(session).find(file));
|
||||
assertSame(directory, list.get(0).getParent());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(file, directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Arrays.asList(file, directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -98,8 +98,8 @@ public class AzureObjectListServiceTest extends AbstractAzureTest {
|
||||
});
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
assertEquals(files.get(i), list.get(i).getName());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(list.get(i)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(list.get(i)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -44,7 +44,7 @@ public class AzureReadFeatureTest extends AbstractAzureTest {
|
||||
final InputStream in = new AzureReadFeature(session).read(test, new TransferStatus().setLength(0L), ConnectionCallback.noop);
|
||||
assertNotNull(in);
|
||||
in.close();
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,6 +70,6 @@ public class AzureReadFeatureTest extends AbstractAzureTest {
|
||||
in.close();
|
||||
// Test double close
|
||||
in.close();
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AsciiRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.transfer.TransferStatus;
|
||||
@@ -37,7 +37,7 @@ public class AzureTouchFeatureTest extends AbstractAzureTest {
|
||||
final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
|
||||
final Path test = new Path(container, String.format(".%s.", new AlphanumericRandomStringService().random()), EnumSet.of(Path.Type.file));
|
||||
new AzureTouchFeature(session).touch(new AzureWriteFeature(session), test, new TransferStatus());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3,7 +3,7 @@ package ch.cyberduck.core.azure;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DescriptiveUrl;
|
||||
import ch.cyberduck.core.DescriptiveUrlBag;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.transfer.TransferStatus;
|
||||
@@ -31,6 +31,6 @@ public class AzureUrlProviderTest extends AbstractAzureTest {
|
||||
for(DescriptiveUrl url : urls) {
|
||||
assertFalse(url.getUrl().isEmpty());
|
||||
}
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.azure;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -65,7 +65,7 @@ public class AzureWriteFeatureTest extends AbstractAzureTest {
|
||||
// Test double close
|
||||
overwrite.close();
|
||||
assertEquals("overwrite".getBytes(StandardCharsets.UTF_8).length, new AzureAttributesFinderFeature(session).find(test).getSize());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,6 +100,6 @@ public class AzureWriteFeatureTest extends AbstractAzureTest {
|
||||
// Test double close
|
||||
overwrite.close();
|
||||
assertEquals("overwrite".getBytes(StandardCharsets.UTF_8).length, new AzureAttributesFinderFeature(session).find(test).getSize());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.azure.AbstractAzureTest;
|
||||
import ch.cyberduck.core.azure.AzureDeleteFeature;
|
||||
@@ -59,7 +59,7 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
|
||||
cryptomator.getFeature(session, Write.class, new AzureWriteFeature(session)), new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(test.getType().contains(Path.Type.decrypted));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -73,6 +73,6 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
|
||||
final Path test = cryptomator.getFeature(session, Directory.class, new AzureDirectoryFeature(session)).mkdir(
|
||||
cryptomator.getFeature(session, Write.class, new AzureWriteFeature(session)), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.azure.AbstractAzureTest;
|
||||
import ch.cyberduck.core.azure.AzureDeleteFeature;
|
||||
@@ -61,6 +61,6 @@ public class AzureListServiceTest extends AbstractAzureTest {
|
||||
new CryptoTouchFeature<>(session, new DefaultTouchFeature<Void>(session), cryptomator).touch(
|
||||
new CryptoWriteFeature<>(session, new AzureWriteFeature(session), cryptomator), test, new TransferStatus());
|
||||
assertEquals(test, new CryptoListService(session, new AzureObjectListService(session), cryptomator).list(vault, new DisabledListProgressListener()).get(0));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.azure.AbstractAzureTest;
|
||||
import ch.cyberduck.core.azure.AzureDeleteFeature;
|
||||
@@ -81,6 +81,6 @@ public class AzureMoveFeatureTest extends AbstractAzureTest {
|
||||
final Path fileRenamedInRenamedFolder = new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new AzureFindFeature(session)).find(fileRenamedInRenamedFolder));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(
|
||||
fileRenamedInRenamedFolder, folderRenamed, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
fileRenamedInRenamedFolder, folderRenamed, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.azure.AbstractAzureTest;
|
||||
import ch.cyberduck.core.azure.AzureDeleteFeature;
|
||||
@@ -64,7 +64,7 @@ public class AzureTouchFeatureTest extends AbstractAzureTest {
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, test.attributes().getSize());
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, status.getResponse().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new AzureFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -81,6 +81,6 @@ public class AzureTouchFeatureTest extends AbstractAzureTest {
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, test.attributes().getSize());
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, status.getResponse().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.azure.AbstractAzureTest;
|
||||
@@ -87,6 +87,6 @@ public class AzureWriteFeatureTest extends AbstractAzureTest {
|
||||
final InputStream in = new CryptoReadFeature(session, new AzureReadFeature(session), cryptomator).read(test, new TransferStatus().setLength(content.length), ConnectionCallback.noop);
|
||||
new StreamCopier(status, status).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -92,7 +92,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream(content.length);
|
||||
assertEquals(content.length, IOUtils.copy(new CryptoReadFeature(session, new AzureReadFeature(session), cryptomator).read(target, new TransferStatus().setLength(content.length), ConnectionCallback.noop), out));
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -117,7 +117,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -141,7 +141,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -172,7 +172,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
final Path fileRenamedInRenamedFolder = new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(fileRenamedInRenamedFolder));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -201,7 +201,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertEquals(content.length, IOUtils.copy(new CryptoReadFeature(session, new AzureReadFeature(session), cryptomator).read(encryptedFile, new TransferStatus().setLength(content.length), ConnectionCallback.noop), out));
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -228,7 +228,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertTrue(new AzureFindFeature(session).find(cleartextFolder));
|
||||
assertTrue(new AzureFindFeature(session).find(cleartextFile));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -256,7 +256,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new AzureFindFeature(session)).find(encryptedFile));
|
||||
assertTrue(new AzureFindFeature(session).find(cleartextFile));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(vault, clearFolder), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(vault, clearFolder), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -285,6 +285,6 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
final Path fileRenamed = new Path(cleartextFolder, encryptedFile.getName(), EnumSet.of(Path.Type.file));
|
||||
assertTrue(new AzureFindFeature(session).find(fileRenamed));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(cleartextFolder, vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(cleartextFolder, vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,10 +17,10 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.NullFilter;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -100,7 +100,7 @@ public class CryptoAzureSingleTransferWorkerTest extends AbstractAzureTest {
|
||||
public TransferAction prompt(final TransferItem file) {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(), ProgressListener.noop, StreamListener.noop, new DisabledLoginCallback(), new DisabledNotificationService()).run(session));
|
||||
}, new DisabledTransferErrorCallback(), ProgressListener.noop, StreamListener.noop, LoginCallback.noop, new DisabledNotificationService()).run(session));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new AzureFindFeature(session)).find(dir1));
|
||||
assertEquals(content.length, cryptomator.getFeature(session, AttributesFinder.class, new AzureAttributesFinderFeature(session)).find(file1).getSize());
|
||||
{
|
||||
@@ -116,7 +116,7 @@ public class CryptoAzureSingleTransferWorkerTest extends AbstractAzureTest {
|
||||
new StreamCopier(StreamCancelation.noop, StreamProgress.noop).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
}
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(file1, file2, dir1, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(file1, file2, dir1, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
localFile1.delete();
|
||||
localFile2.delete();
|
||||
localDirectory1.delete();
|
||||
|
||||
@@ -17,9 +17,9 @@ package ch.cyberduck.core.worker;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.NullFilter;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -84,9 +84,9 @@ public class AzureSingleTransferWorkerTest extends AbstractAzureTest {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(),
|
||||
ProgressListener.noop, StreamListener.noop, new DisabledLoginCallback(), new DisabledNotificationService()).run(session));
|
||||
ProgressListener.noop, StreamListener.noop, LoginCallback.noop, new DisabledNotificationService()).run(session));
|
||||
assertArrayEquals(content, IOUtils.toByteArray(localFile.getInputStream()));
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new AzureDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
localFile.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.worker;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -53,7 +53,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
worker.run(session);
|
||||
assertTrue(new AzureFindFeature(session).find(source));
|
||||
assertTrue(new AzureFindFeature(session).find(target));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(source, target), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(source, target), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -71,7 +71,7 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
worker.run(session);
|
||||
assertTrue(new AzureFindFeature(session).find(sourceFile));
|
||||
assertTrue(new AzureFindFeature(session).find(targetFile));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(sourceFile, targetFolder), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(sourceFile, targetFolder), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -92,6 +92,6 @@ public class CopyWorkerTest extends AbstractAzureTest {
|
||||
assertTrue(new AzureFindFeature(session).find(targetFile));
|
||||
assertTrue(new AzureFindFeature(session).find(folder));
|
||||
assertTrue(new AzureFindFeature(session).find(sourceFile));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(folder, targetFolder), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(folder, targetFolder), ProgressListener.noop).run(session);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.b2;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.NullFilter;
|
||||
import ch.cyberduck.core.PasswordCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
@@ -61,7 +61,7 @@ public class B2VersioningFeature implements Versioning {
|
||||
|
||||
@Override
|
||||
public void revert(final Path file) throws BackgroundException {
|
||||
new B2CopyFeature(session, fileid).copy(file, file, new TransferStatus(), new DisabledLoginCallback(), StreamListener.noop);
|
||||
new B2CopyFeature(session, fileid).copy(file, file, new TransferStatus(), LoginCallback.noop, StreamListener.noop);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.b2;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.SimplePathPredicate;
|
||||
@@ -63,7 +63,7 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(attributes.getVersionId());
|
||||
assertNull(attributes.getFileId());
|
||||
assertNotEquals(Checksum.NONE, attributes.getChecksum());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -76,7 +76,7 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
final Path test = new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), new Path(directory, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), status);
|
||||
assertNotNull(status.getResponse().getVersionId());
|
||||
assertNotNull(test.attributes().getVersionId());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(test).withAttributes(PathAttributes.EMPTY)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(test).withAttributes(PathAttributes.EMPTY)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
final B2AttributesFinderFeature f = new B2AttributesFinderFeature(session, fileid);
|
||||
assertEquals(test.attributes(), f.find(test));
|
||||
try {
|
||||
@@ -86,8 +86,8 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(directory, new DisabledListProgressListener()).toList(), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(directory, new DisabledListProgressListener()).toList(), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -107,7 +107,7 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -119,7 +119,7 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(attributes);
|
||||
assertNotEquals(PathAttributes.EMPTY, attributes);
|
||||
assertEquals(bucket.attributes().getVersionId(), attributes.getVersionId());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -155,7 +155,7 @@ public class B2AttributesFinderFeatureTest extends AbstractB2Test {
|
||||
fileid.cache(test, invalidId);
|
||||
final B2AttributesFinderFeature f = new B2AttributesFinderFeature(session, fileid);
|
||||
assertEquals(latestnodeid, f.find(test).getVersionId());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DescriptiveUrl;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.features.Share;
|
||||
@@ -47,6 +47,6 @@ public class B2AuthorizedUrlProviderTest extends AbstractB2Test {
|
||||
final DescriptiveUrl url = provider.toDownloadUrl(test, Share.Sharee.world, null, new DisabledPasswordCallback());
|
||||
assertNotEquals(DescriptiveUrl.EMPTY, url);
|
||||
assertNotNull(url.getUrl());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.b2;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.transfer.TransferStatus;
|
||||
@@ -39,7 +39,7 @@ public class B2BucketTypeFeatureTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)),
|
||||
new TransferStatus());
|
||||
assertEquals("allPrivate", new B2BucketTypeFeature(session, fileid).getLocation(bucket).getIdentifier());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -48,6 +48,6 @@ public class B2BucketTypeFeatureTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)),
|
||||
new TransferStatus().setRegion("allPublic"));
|
||||
assertEquals("allPublic", new B2BucketTypeFeature(session, fileid).getLocation(bucket).getIdentifier());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.UnsupportedException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -59,7 +59,7 @@ public class B2CopyFeatureTest extends AbstractB2Test {
|
||||
assertNotEquals(test.attributes().getVersionId(), copy.attributes().getVersionId());
|
||||
assertTrue(new B2FindFeature(session, fileid).find(new Path(container, name, EnumSet.of(Path.Type.file))));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(copy));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -74,7 +74,7 @@ public class B2CopyFeatureTest extends AbstractB2Test {
|
||||
final Path copy = new B2CopyFeature(session, fileid).copy(test, new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus(), ConnectionCallback.noop, StreamListener.noop);
|
||||
assertTrue(new B2FindFeature(session, fileid).find(new Path(container, name, EnumSet.of(Path.Type.file))));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(copy));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy, target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy, target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -91,6 +91,6 @@ public class B2CopyFeatureTest extends AbstractB2Test {
|
||||
final Find find = new DefaultFindFeature(session);
|
||||
assertTrue(find.find(test));
|
||||
assertTrue(find.find(copy));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -42,7 +42,7 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
public void testDeleteNotFound() throws Exception {
|
||||
final Path bucket = new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume));
|
||||
final Path test = new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -56,12 +56,12 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(versionId);
|
||||
// Hide
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(test.withAttributes(PathAttributes.EMPTY)),
|
||||
new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
LoginCallback.noop, new Delete.DisabledCallback());
|
||||
// Double hide. Ignore failure already_hidden
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(test.withAttributes(PathAttributes.EMPTY)),
|
||||
new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,7 +70,7 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
|
||||
final Path file = new Path(bucket, String.format("%s %s", new AlphanumericRandomStringService().random(), "1"), EnumSet.of(Path.Type.file));
|
||||
new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), file, new TransferStatus());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(file));
|
||||
assertFalse(new B2FindFeature(session, fileid).find(bucket));
|
||||
}
|
||||
@@ -81,16 +81,16 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
|
||||
final Path file = new Path(bucket, String.format("%s %s", new AlphanumericRandomStringService().random(), "1"), EnumSet.of(Path.Type.file));
|
||||
new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), file, new TransferStatus());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(file));
|
||||
try {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(PathAttributes.EMPTY)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(PathAttributes.EMPTY)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
fail();
|
||||
}
|
||||
catch(NotfoundException e) {
|
||||
//
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -99,11 +99,11 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
|
||||
final Path file = new Path(bucket, String.format("%s %s", new AlphanumericRandomStringService().random(), "1"), EnumSet.of(Path.Type.file));
|
||||
new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), file, new TransferStatus());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(PathAttributes.EMPTY)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(PathAttributes.EMPTY)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(file));
|
||||
assertFalse(new DefaultFindFeature(session).find(file));
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, new B2VersionIdProvider(session)).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -111,7 +111,7 @@ public class B2DeleteFeatureTest extends AbstractB2Test {
|
||||
final B2VersionIdProvider fileid = new B2VersionIdProvider(session);
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
|
||||
final Path directory = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(bucket, String.format("%s %s", new AlphanumericRandomStringService().random(), "1"), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(directory));
|
||||
assertFalse(new B2FindFeature(session, fileid).find(bucket));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.b2;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.ConflictException;
|
||||
@@ -45,7 +45,7 @@ public class B2DirectoryFeatureTest extends AbstractB2Test {
|
||||
assertTrue(feature.isSupported(bucket.getParent(), bucket.getName()));
|
||||
feature.mkdir(new B2WriteFeature(session, fileid), bucket, new TransferStatus());
|
||||
assertThrows(ConflictException.class, () -> feature.mkdir(new B2WriteFeature(session, fileid), bucket, new TransferStatus()));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = ConflictException.class)
|
||||
@@ -88,11 +88,11 @@ public class B2DirectoryFeatureTest extends AbstractB2Test {
|
||||
assertNotEquals(PathAttributes.EMPTY, new B2AttributesFinderFeature(session, fileid).find(directory));
|
||||
assertEquals(directory.attributes().getVersionId(), new B2VersionIdProvider(session).getVersionId(new Path(bucket, filename, EnumSet.of(Path.Type.directory))));
|
||||
// Mark as hidden
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(directory).withAttributes(PathAttributes.EMPTY)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(directory).withAttributes(PathAttributes.EMPTY)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
// .bzEmpty is deleted not hidden
|
||||
assertFalse(new B2FindFeature(session, fileid).find(directory));
|
||||
assertFalse(new DefaultFindFeature(session).find(directory));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -105,6 +105,6 @@ public class B2DirectoryFeatureTest extends AbstractB2Test {
|
||||
final Path directory = new B2DirectoryFeature(session, fileid).mkdir(
|
||||
new B2WriteFeature(session, fileid), new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), status);
|
||||
assertEquals(timestamp, new B2AttributesFinderFeature(session, fileid).find(directory).getModificationDate());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AsciiRandomStringService;
|
||||
import ch.cyberduck.core.CachingFindFeature;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -49,7 +49,7 @@ public class B2FindFeatureTest extends AbstractB2Test {
|
||||
new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), file, new TransferStatus());
|
||||
assertTrue(new B2FindFeature(session, fileid).find(file));
|
||||
assertFalse(new B2FindFeature(session, fileid).find(new Path(bucket, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file))));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -78,7 +78,7 @@ public class B2FindFeatureTest extends AbstractB2Test {
|
||||
assertTrue(new B2FindFeature(session, fileid).find(new Path(container, prefix, EnumSet.of(Path.Type.directory, Path.Type.placeholder))));
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(intermediate,
|
||||
new DisabledListProgressListener()).contains(test));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(test));
|
||||
assertFalse(new B2FindFeature(session, fileid).find(intermediate));
|
||||
final PathCache cache = new PathCache(1);
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.features.Find;
|
||||
@@ -64,7 +64,7 @@ public class B2LargeCopyFeatureTest extends AbstractB2Test {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -89,7 +89,7 @@ public class B2LargeCopyFeatureTest extends AbstractB2Test {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy, target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy, target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -111,6 +111,6 @@ public class B2LargeCopyFeatureTest extends AbstractB2Test {
|
||||
final Find find = new DefaultFindFeature(session);
|
||||
assertTrue(find.find(test));
|
||||
assertTrue(find.find(copy));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.b2;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -96,7 +96,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
in.close();
|
||||
buffer.close();
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
}
|
||||
};
|
||||
try {
|
||||
service.upload(new B2WriteFeature(session, fileid), test, new Local(System.getProperty("java.io.tmpdir"), name), new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
service.upload(new B2WriteFeature(session, fileid), test, new Local(System.getProperty("java.io.tmpdir"), name), new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
}
|
||||
catch(BackgroundException e) {
|
||||
// Expected
|
||||
@@ -140,7 +140,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
final TransferStatus append = new TransferStatus().setAppend(true).setLength(content.length);
|
||||
service.upload(new B2WriteFeature(session, fileid), test, local,
|
||||
new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, StreamListener.noop, append,
|
||||
new DisabledLoginCallback());
|
||||
LoginCallback.noop);
|
||||
assertEquals(content.length, append.getResponse().getSize());
|
||||
assertTrue(new B2FindFeature(session, fileid).find(test));
|
||||
assertEquals(content.length, new B2AttributesFinderFeature(session, fileid).find(test).getSize());
|
||||
@@ -150,7 +150,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
IOUtils.readFully(in, buffer);
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
};
|
||||
final BytecountStreamListener count = new BytecountStreamListener();
|
||||
try {
|
||||
feature.upload(new B2WriteFeature(session, fileid), test, new Local(System.getProperty("java.io.tmpdir"), name), new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
feature.upload(new B2WriteFeature(session, fileid), test, new Local(System.getProperty("java.io.tmpdir"), name), new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
}
|
||||
catch(BackgroundException e) {
|
||||
// Expected
|
||||
@@ -199,7 +199,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
final TransferStatus append = new TransferStatus().setAppend(true).setLength(2L * 1000L * 1000L).setOffset(5 * 1000L * 1000L);
|
||||
feature.upload(new B2WriteFeature(session, fileid), test, local,
|
||||
new BandwidthThrottle(BandwidthThrottle.UNLIMITED), ProgressListener.noop, count, append,
|
||||
new DisabledLoginCallback());
|
||||
LoginCallback.noop);
|
||||
assertEquals(6 * 1000L * 1000L, count.getSent());
|
||||
assertTrue(append.isComplete());
|
||||
assertEquals(content.length, append.getResponse().getSize());
|
||||
@@ -210,7 +210,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
IOUtils.readFully(in, buffer);
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.io.StatusOutputStream;
|
||||
@@ -68,7 +68,7 @@ public class B2LargeUploadWriteFeatureTest extends AbstractB2Test {
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
assertEquals(1503654614004L, new B2AttributesFinderFeature(session, fileid).find(file).getModificationDate());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -94,7 +94,7 @@ public class B2LargeUploadWriteFeatureTest extends AbstractB2Test {
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
assertEquals(1503654614004L, new B2AttributesFinderFeature(session, fileid).find(file).getModificationDate());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -121,6 +121,6 @@ public class B2LargeUploadWriteFeatureTest extends AbstractB2Test {
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
assertEquals(1503654614004L, new B2AttributesFinderFeature(session, fileid).find(file).getModificationDate());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.b2;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.lifecycle.LifecycleConfiguration;
|
||||
@@ -46,6 +46,6 @@ public class B2LifecycleFeatureTest extends AbstractB2Test {
|
||||
assertEquals(1, configuration.getTransition(), 0L);
|
||||
new B2LifecycleFeature(session, fileid).setConfiguration(bucket, LifecycleConfiguration.empty());
|
||||
assertEquals(LifecycleConfiguration.empty(), new B2LifecycleFeature(session, fileid).getConfiguration(bucket));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.synchronization.Comparison;
|
||||
@@ -50,6 +50,6 @@ public class B2MoveFeatureTest extends AbstractB2Test {
|
||||
assertTrue(new B2FindFeature(session, fileid).find(target));
|
||||
assertEquals(target.attributes(), new B2AttributesFinderFeature(session, fileid).find(target));
|
||||
assertEquals(Comparison.equal, session.getHost().getProtocol().getFeature(ComparisonService.class).compare(Path.Type.file, test.attributes(), target.attributes()));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DefaultPathAttributes;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.IndexedListProgressListener;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.SimplePathPredicate;
|
||||
import ch.cyberduck.core.VersioningConfiguration;
|
||||
@@ -76,7 +76,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
}
|
||||
}).isEmpty());
|
||||
assertTrue(callback.get());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -88,7 +88,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(".", folder.getName());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder, new DisabledListProgressListener()).isEmpty());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).contains(folder));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(folder, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(folder, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,7 +102,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(folder, test.getParent());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(test, new DisabledListProgressListener()).isEmpty());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder, new DisabledListProgressListener()).contains(test));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, folder, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, folder, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -115,7 +115,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(".", file.getName());
|
||||
assertEquals(folder, file.getParent());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder, new DisabledListProgressListener()).contains(file));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, folder, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, folder, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -127,7 +127,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(bucket, file.getParent());
|
||||
assertEquals("..", file.getName());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).contains(file));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
@@ -153,9 +153,9 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertNull(list.find(new SimplePathPredicate(file)).attributes().getRevision());
|
||||
assertEquals(0L, list.find(new SimplePathPredicate(file)).attributes().getSize());
|
||||
assertSame(bucket, list.find(new SimplePathPredicate(file)).getParent());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).contains(file));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -168,7 +168,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
final AttributedList<Path> list = new B2ObjectListService(session, fileid, 1, new VersioningConfiguration(true)).list(bucket, new DisabledListProgressListener());
|
||||
assertTrue(list.contains(file1));
|
||||
assertTrue(list.contains(file2));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file1, file2), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file1, file2), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -216,7 +216,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(Long.valueOf(1L), list.find(path -> path.attributes().isDuplicate()).attributes().getRevision());
|
||||
}
|
||||
// Add hide marker
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(new DefaultPathAttributes(file.attributes()).setVersionId(null))), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(new DefaultPathAttributes(file.attributes()).setVersionId(null))), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
{
|
||||
final AttributedList<Path> list = new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener());
|
||||
assertEquals(3, list.size());
|
||||
@@ -242,9 +242,9 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(list, versions);
|
||||
assertFalse(versions.contains(other));
|
||||
for(Path f : list) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(other, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(other, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -293,7 +293,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(response.getFileId(), list.find(new SimplePathPredicate(file)).attributes().getVersionId());
|
||||
}
|
||||
// Add hide marker
|
||||
new B2DeleteFeature(session, fileid, VersioningConfiguration.empty()).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid, VersioningConfiguration.empty()).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(bucket, new DisabledListProgressListener()).isEmpty());
|
||||
assertFalse(new B2FindFeature(session, fileid).find(file));
|
||||
assertFalse(new DefaultFindFeature(session).find(file));
|
||||
@@ -307,9 +307,9 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
final AttributedList<Path> list = new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener());
|
||||
assertEquals(list, new B2VersioningFeature(session, fileid).list(file, new DisabledListProgressListener()));
|
||||
for(Path f : list) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -337,25 +337,25 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertSame(folder1, list.find(new SimplePathPredicate(file1)).getParent());
|
||||
assertSame(folder1, list.find(new SimplePathPredicate(folder2)).getParent());
|
||||
// Nullify version to add delete marker
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file2).withAttributes(new DefaultPathAttributes(file2.attributes()).setVersionId(null))), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file2).withAttributes(new DefaultPathAttributes(file2.attributes()).setVersionId(null))), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(folder2, new DisabledListProgressListener()).isEmpty());
|
||||
assertFalse(new B2ObjectListService(session, fileid).list(folder2, new DisabledListProgressListener()).isEmpty());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder2), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder2), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder2, new DisabledListProgressListener()).contains(file2));
|
||||
assertThrows(NotfoundException.class, () -> new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(folder2, new DisabledListProgressListener()));
|
||||
// Nullify version to add delete marker
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file1).withAttributes(new DefaultPathAttributes(file1.attributes()).setVersionId(null))), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file1).withAttributes(new DefaultPathAttributes(file1.attributes()).setVersionId(null))), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(folder1, new DisabledListProgressListener()).isEmpty());
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder1, new DisabledListProgressListener()).contains(folder2));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder1), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(folder1), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertThrows(NotfoundException.class, () -> new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(folder1, new DisabledListProgressListener()));
|
||||
for(Path f : new B2ObjectListService(session, fileid).list(folder1, new DisabledListProgressListener())) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
for(Path f : new B2ObjectListService(session, fileid).list(folder2, new DisabledListProgressListener())) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -374,7 +374,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertFalse(foundFolder1.attributes().isDuplicate());
|
||||
}
|
||||
// Nullify version to add delete marker
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file1).withAttributes(new DefaultPathAttributes(file1.attributes()).setVersionId(null))), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(new Path(file1).withAttributes(new DefaultPathAttributes(file1.attributes()).setVersionId(null))), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(bucket, new DisabledListProgressListener()).isEmpty());
|
||||
{
|
||||
final AttributedList<Path> list = new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener());
|
||||
@@ -382,9 +382,9 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(folder1, list.iterator().next());
|
||||
}
|
||||
for(Path f : new B2ObjectListService(session, fileid).list(folder1, new DisabledListProgressListener())) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -411,16 +411,16 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertFalse(foundFolder2.attributes().isDuplicate());
|
||||
}
|
||||
// Nullify version to add delete marker
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(new DefaultPathAttributes(file.attributes()).setVersionId(null))), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file.withAttributes(new DefaultPathAttributes(file.attributes()).setVersionId(null))), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new DefaultFindFeature(session).find(folder1, new DisabledListProgressListener()));
|
||||
assertTrue(new B2ObjectListService(session, fileid).list(folder1, new DisabledListProgressListener()).contains(folder2));
|
||||
assertTrue(new DefaultFindFeature(session).find(folder2, new DisabledListProgressListener()));
|
||||
assertEquals(2, new B2ObjectListService(session, fileid).list(folder2, new DisabledListProgressListener()).size());
|
||||
assertThrows(NotfoundException.class, () -> new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()).list(folder2, new DisabledListProgressListener()));
|
||||
for(Path f : new B2ObjectListService(session, fileid).list(folder2, new DisabledListProgressListener())) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -435,7 +435,7 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
assertEquals(2, list.size());
|
||||
assertTrue(list.contains(file1));
|
||||
assertTrue(list.contains(folder1));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file1, folder1, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file1, folder1, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -464,8 +464,8 @@ public class B2ObjectListServiceTest extends AbstractB2Test {
|
||||
});
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
assertEquals(files.get(i), list.get(i).getName());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(list.get(i)), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(list.get(i)), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.b2;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -83,9 +83,9 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
// Ignore update. As with unknown length for chunked transfer
|
||||
return this;
|
||||
}
|
||||
}, new DisabledLoginCallback());
|
||||
}, LoginCallback.noop);
|
||||
assertEquals(923L, local.attributes().getSize());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -112,7 +112,7 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(in);
|
||||
in.close();
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -144,7 +144,7 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -176,7 +176,7 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -193,7 +193,7 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
final CountingInputStream in = new CountingInputStream(new B2ReadFeature(session, fileid).read(file, status, ConnectionCallback.noop));
|
||||
in.close();
|
||||
assertEquals(0L, in.getByteCount(), 0L);
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -209,14 +209,14 @@ public class B2ReadFeatureTest extends AbstractB2Test {
|
||||
test.attributes().setVersionId(invalidId);
|
||||
fileid.cache(test, invalidId);
|
||||
try {
|
||||
final InputStream in = new B2ReadFeature(session, fileid).read(test, new TransferStatus().setRemote(test.attributes()), new DisabledLoginCallback());
|
||||
final InputStream in = new B2ReadFeature(session, fileid).read(test, new TransferStatus().setRemote(test.attributes()), LoginCallback.noop);
|
||||
fail();
|
||||
}
|
||||
catch(NotfoundException e) {
|
||||
//
|
||||
}
|
||||
assertNull(test.attributes().getVersionId());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(new B2ObjectListService(session, fileid).list(bucket, new DisabledListProgressListener()).toList(), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.b2;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.SimplePathPredicate;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -52,7 +52,7 @@ public class B2SearchFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(feature.search(bucket, new SearchFilter(StringUtils.substring(name, 0, name.length() - 2)), new DisabledListProgressListener()).find(new SimplePathPredicate(file)));
|
||||
final Path subdir = new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
assertNull(feature.search(subdir, new SearchFilter(name), new DisabledListProgressListener()).find(new SimplePathPredicate(file)));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -65,7 +65,7 @@ public class B2SearchFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(feature.search(bucket, new SearchFilter(name), new DisabledListProgressListener()).find(new SimplePathPredicate(file)));
|
||||
assertNotNull(feature.search(new Path("/", EnumSet.of(Path.Type.directory, Path.Type.volume)), new SearchFilter(StringUtils.substring(name, 2)), new DisabledListProgressListener()).find(new SimplePathPredicate(file)));
|
||||
assertNotNull(feature.search(new Path("/", EnumSet.of(Path.Type.directory, Path.Type.volume)), new SearchFilter(StringUtils.substring(name, 0, name.length() - 2)), new DisabledListProgressListener()).find(new SimplePathPredicate(file)));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -91,6 +91,6 @@ public class B2SearchFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(result.find(new SimplePathPredicate(filesubdir)));
|
||||
assertEquals(subdir, result.find(new SimplePathPredicate(filesubdir)).getParent());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, filesubdir, subdir), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(file, filesubdir, subdir), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.Credentials;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.ProtocolFactory;
|
||||
import ch.cyberduck.core.Session;
|
||||
import ch.cyberduck.core.exception.LoginFailureException;
|
||||
@@ -61,7 +61,7 @@ public class B2SessionTest {
|
||||
System.getProperties().getProperty("b2.user"), "s"
|
||||
));
|
||||
final B2Session session = new B2Session(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
session.login(LoginCallback.noop, CancelCallback.noop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -74,7 +74,7 @@ public class B2SingleUploadServiceTest extends AbstractB2Test {
|
||||
in.close();
|
||||
buffer.close();
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.io.StreamCopier;
|
||||
@@ -63,7 +63,7 @@ public class B2ThresholdCopyFeatureTest extends AbstractB2Test{
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -88,6 +88,6 @@ public class B2ThresholdCopyFeatureTest extends AbstractB2Test{
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DescriptiveUrl;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.transfer.TransferStatus;
|
||||
@@ -45,6 +45,6 @@ public class B2UrlProviderTest extends AbstractB2Test {
|
||||
assertEquals(0, provider.toUrl(bucket).size());
|
||||
assertEquals(1, provider.toUrl(test).size());
|
||||
assertNotNull(provider.toUrl(test).find(DescriptiveUrl.Type.http).getUrl());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DefaultPathAttributes;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -58,7 +58,7 @@ public class B2VersionIdProviderTest extends AbstractB2Test {
|
||||
duplicate.setDuplicate(true);
|
||||
fileid.cache(new Path(file).withAttributes(duplicate), "d");
|
||||
assertEquals(versionId, fileid.getVersionId(file));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(bucket, file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,7 +67,7 @@ public class B2VersionIdProviderTest extends AbstractB2Test {
|
||||
final Path bucket = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
|
||||
final Path folder = new B2DirectoryFeature(session, fileid).mkdir(new B2WriteFeature(session, fileid), new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertNotNull(fileid.getVersionId(folder));
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(folder, bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(folder, bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -20,7 +20,7 @@ import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DefaultPathAttributes;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -89,8 +89,8 @@ public class B2VersioningFeatureTest extends AbstractB2Test {
|
||||
assertEquals(status.getResponse().getVersionId(), versions.get(0).attributes().getVersionId());
|
||||
assertEquals(initialVersion, versions.get(1).attributes().getVersionId());
|
||||
for(Path version : new B2ListService(session, fileid).list(room, new DisabledListProgressListener())) {
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(version), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(version), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.b2;
|
||||
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.ChecksumException;
|
||||
@@ -104,6 +104,6 @@ public class B2WriteFeatureTest extends AbstractB2Test {
|
||||
new StreamCopier(new TransferStatus(), new TransferStatus()).transfer(new ByteArrayInputStream(overwriteContent), overwrite);
|
||||
assertNotEquals(new B2AttributesFinderFeature(session, fileid).toAttributes(response), new B2AttributesFinderFeature(session, fileid).toAttributes(overwrite.getStatus()));
|
||||
assertNotEquals(((B2FileResponse) response).getFileId(), ((B2FileResponse) overwrite.getStatus()).getFileId());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.VersioningConfiguration;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
@@ -74,10 +74,10 @@ public class B2DirectoryFeatureTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(test));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
assertEquals(versionId, cryptomator.getFeature(session, AttributesFinder.class, new B2AttributesFinderFeature(session, fileid)).find(test).getVersionId());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertTrue(new CryptoListService(session, new B2ObjectListService(session, fileid, 1, VersioningConfiguration.empty()), cryptomator).list(vault, new DisabledListProgressListener())
|
||||
.toStream().filter(f -> !f.attributes().isDuplicate()).collect(Collectors.toList()).isEmpty());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -92,6 +92,6 @@ public class B2DirectoryFeatureTest extends AbstractB2Test {
|
||||
final Path test = cryptomator.getFeature(session, Directory.class, new B2DirectoryFeature(session, fileid)).mkdir(
|
||||
cryptomator.getFeature(session, Write.class, new B2WriteFeature(session, fileid)), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ package ch.cyberduck.core.cryptomator;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
@@ -103,7 +103,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
final InputStream in = new CryptoReadFeature(session, new B2ReadFeature(session, fileid), cryptomator).read(test, readStatus, ConnectionCallback.noop);
|
||||
new StreamCopier(readStatus, readStatus).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class B2LargeUploadServiceTest extends AbstractB2Test {
|
||||
final InputStream in = new CryptoReadFeature(session, new B2ReadFeature(session, fileid), cryptomator).read(test, readStatus, ConnectionCallback.noop);
|
||||
new StreamCopier(readStatus, readStatus).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2DeleteFeature;
|
||||
@@ -84,6 +84,6 @@ public class B2LargeUploadWriteFeatureTest extends AbstractB2Test {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2DeleteFeature;
|
||||
@@ -67,6 +67,6 @@ public class B2ListServiceTest extends AbstractB2Test {
|
||||
new CryptoWriteFeature<>(session, new B2WriteFeature(session, fileid), cryptomator), new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
|
||||
test.attributes().setVersionId(new CryptoVersionIdProvider(session, fileid, cryptomator).getVersionId(test));
|
||||
assertEquals(test, new CryptoListService(session, new B2ListService(session, fileid), cryptomator).list(vault, new DisabledListProgressListener()).get(0));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2AttributesFinderFeature;
|
||||
@@ -72,7 +72,7 @@ public class B2TouchFeatureTest extends AbstractB2Test {
|
||||
assertNotNull(test.attributes().getVersionId());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(test));
|
||||
assertEquals(test.attributes(), cryptomator.getFeature(session, AttributesFinder.class, new B2AttributesFinderFeature(session, fileid)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -90,7 +90,7 @@ public class B2TouchFeatureTest extends AbstractB2Test {
|
||||
assertEquals(0L, test.attributes().getSize());
|
||||
assertEquals(0L, status.getResponse().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -108,6 +108,6 @@ public class B2TouchFeatureTest extends AbstractB2Test {
|
||||
assertEquals(0L, status.getResponse().getSize());
|
||||
assertNotNull(test.attributes().getVersionId());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
@@ -91,6 +91,6 @@ public class B2WriteFeatureTest extends AbstractB2Test {
|
||||
final InputStream in = new CryptoReadFeature(session, new B2ReadFeature(session, fileid), cryptomator).read(test, new TransferStatus().setLength(content.length), ConnectionCallback.noop);
|
||||
new StreamCopier(status, status).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -95,7 +95,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream(content.length);
|
||||
assertEquals(content.length, IOUtils.copy(new CryptoReadFeature(session, new B2ReadFeature(session, fileid), cryptomator).read(target, new TransferStatus().setLength(content.length), ConnectionCallback.noop), out));
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -121,7 +121,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -148,7 +148,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -181,7 +181,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
final Path fileRenamedInRenamedFolder = new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(fileRenamedInRenamedFolder));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -207,7 +207,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
assertTrue(new B2FindFeature(session, fileid).find(cleartextFile));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(encryptedFile));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -235,7 +235,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
assertTrue(new B2FindFeature(session, fileid).find(cleartextFolder));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(cleartextFile));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -264,7 +264,7 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(encryptedFile));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(cleartextFile));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(vault, clearFolder), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(vault, clearFolder), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -294,6 +294,6 @@ public class CopyWorkerTest extends AbstractB2Test {
|
||||
final Path fileRenamed = new Path(cleartextFolder, encryptedFile.getName(), EnumSet.of(Path.Type.file));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(fileRenamed));
|
||||
registry.clear();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(cleartextFolder, vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(cleartextFolder, vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,10 +17,10 @@ package ch.cyberduck.core.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.NullFilter;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -101,7 +101,7 @@ public class CryptoB2SingleTransferWorkerTest extends AbstractB2Test {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(),
|
||||
ProgressListener.noop, StreamListener.noop, new DisabledLoginCallback(), new DisabledNotificationService()) {
|
||||
ProgressListener.noop, StreamListener.noop, LoginCallback.noop, new DisabledNotificationService()) {
|
||||
|
||||
}.run(session));
|
||||
final B2VersionIdProvider fileid = new B2VersionIdProvider(session);
|
||||
@@ -120,7 +120,7 @@ public class CryptoB2SingleTransferWorkerTest extends AbstractB2Test {
|
||||
new StreamCopier(new TransferStatus(), new TransferStatus()).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
}
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(file1, file2, dir1, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(file1, file2, dir1, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
localFile1.delete();
|
||||
localFile2.delete();
|
||||
localDirectory1.delete();
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -76,11 +76,11 @@ public class MoveWorkerTest extends AbstractB2Test {
|
||||
cryptomator.getFeature(session, Write.class, new B2WriteFeature(session, fileid)), encryptedFolder, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
// move file into vault
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFile, encryptedFile), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFile, encryptedFile), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(new DefaultFindFeature(session).find(clearFile));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ public class MoveWorkerTest extends AbstractB2Test {
|
||||
// move directory into vault
|
||||
final Path encryptedFolder = new Path(vault, clearFolder.getName(), EnumSet.of(Path.Type.directory));
|
||||
final Path encryptedFile = new Path(encryptedFolder, clearFile.getName(), EnumSet.of(Path.Type.file));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFolder, encryptedFolder), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFolder, encryptedFolder), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
assertFalse(new DefaultFindFeature(session).find(clearFolder));
|
||||
assertThrows(NotfoundException.class, () -> new DefaultFindFeature(session).find(clearFile));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -133,12 +133,12 @@ public class MoveWorkerTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
// move file outside vault
|
||||
final Path fileRenamed = new Path(clearFolder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFile, fileRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFile, fileRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
assertTrue(new DefaultFindFeature(session).find(fileRenamed));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(fileRenamed, clearFolder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Arrays.asList(encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(fileRenamed, clearFolder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -161,15 +161,15 @@ public class MoveWorkerTest extends AbstractB2Test {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
// move directory outside vault
|
||||
final Path directoryRenamed = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFolder, directoryRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFolder, directoryRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(encryptedFolder));
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new B2FindFeature(session, fileid)).find(encryptedFile));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(directoryRenamed));
|
||||
final Path fileRenamed = new Path(directoryRenamed, encryptedFile.getName(), EnumSet.of(Path.Type.file));
|
||||
assertTrue(new B2FindFeature(session, fileid).find(fileRenamed));
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(fileRenamed, directoryRenamed), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new B2DeleteFeature(session, fileid)).delete(Collections.singletonList(vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Arrays.asList(fileRenamed, directoryRenamed), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ package ch.cyberduck.core.shared;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.Attributes;
|
||||
import ch.cyberduck.core.CachingAttributesFinderFeature;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
@@ -90,6 +90,6 @@ public class CachingAttributesFinderFeatureTest extends AbstractB2Test {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.shared;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.CachingAttributesFinderFeature;
|
||||
import ch.cyberduck.core.CachingFindFeature;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
@@ -59,7 +59,7 @@ public class CachingFindFeatureTest extends AbstractB2Test {
|
||||
assertTrue(f.find(test));
|
||||
// Find without version id set in attributes
|
||||
assertTrue(f.find(new Path(test).withAttributes(PathAttributes.EMPTY)));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -92,7 +92,7 @@ public class CachingFindFeatureTest extends AbstractB2Test {
|
||||
}).find(new Path(test).withAttributes(PathAttributes.EMPTY)));
|
||||
// Test wrong type
|
||||
assertFalse(f.find(new Path(bucket, test.getName(), EnumSet.of(Path.Type.directory))));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(bucket), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ package ch.cyberduck.core.shared;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2DeleteFeature;
|
||||
@@ -50,7 +50,7 @@ public class DefaultAttributesFinderFeatureTest extends AbstractB2Test {
|
||||
new B2TouchFeature(session, fileid).touch(new B2WriteFeature(session, fileid), file, new TransferStatus());
|
||||
// Find without version id set in attributes
|
||||
assertNotNull(new DefaultAttributesFinderFeature(session).find(file).getVersionId());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.shared;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2DeleteFeature;
|
||||
@@ -82,7 +82,7 @@ public class DefaultDownloadFeatureTest extends AbstractB2Test {
|
||||
IOUtils.readFully(in, buffer);
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -113,6 +113,6 @@ public class DefaultDownloadFeatureTest extends AbstractB2Test {
|
||||
IOUtils.readFully(in, buffer);
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.shared;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.b2.AbstractB2Test;
|
||||
import ch.cyberduck.core.b2.B2DeleteFeature;
|
||||
@@ -55,7 +55,7 @@ public class DefaultFindFeatureTest extends AbstractB2Test {
|
||||
// Find without version id set in attributes
|
||||
assertTrue(new DefaultFindFeature(session).find(file));
|
||||
assertTrue(new DefaultFindFeature(session).find(test));
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+3
-3
@@ -19,11 +19,11 @@ import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.Credentials;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.DisabledTranscriptListener;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.LoginConnectionService;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -110,7 +110,7 @@ public class B2ConcurrentTransferWorkerTest extends AbstractB2Test {
|
||||
return super.getProperty(key);
|
||||
}
|
||||
};
|
||||
final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback(),
|
||||
final LoginConnectionService connect = new LoginConnectionService(LoginCallback.noop,
|
||||
new DisabledHostKeyCallback(),
|
||||
new TestPasswordStore(),
|
||||
ProgressListener.noop);
|
||||
@@ -181,6 +181,6 @@ public class B2ConcurrentTransferWorkerTest extends AbstractB2Test {
|
||||
assertEquals(content.length, counter.getRecv(), 0L);
|
||||
assertEquals(content.length, counter.getSent(), 0L);
|
||||
assertTrue(failed.get());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ package ch.cyberduck.core.worker;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.Credentials;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.LoginConnectionService;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
@@ -136,7 +136,7 @@ public class B2SingleTransferWorkerTest extends VaultTest {
|
||||
return super._getFeature(type);
|
||||
}
|
||||
};
|
||||
new LoginConnectionService(new DisabledLoginCallback(),
|
||||
new LoginConnectionService(LoginCallback.noop,
|
||||
new DisabledHostKeyCallback(),
|
||||
new TestPasswordStore(),
|
||||
ProgressListener.noop).check(session, CancelCallback.noop);
|
||||
@@ -150,7 +150,7 @@ public class B2SingleTransferWorkerTest extends VaultTest {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(),
|
||||
ProgressListener.noop, counter, new DisabledLoginCallback(), new DisabledNotificationService()) {
|
||||
ProgressListener.noop, counter, LoginCallback.noop, new DisabledNotificationService()) {
|
||||
|
||||
}.run(session));
|
||||
local.delete();
|
||||
@@ -162,6 +162,6 @@ public class B2SingleTransferWorkerTest extends VaultTest {
|
||||
assertEquals(content.length, counter.getRecv(), 0L);
|
||||
assertEquals(content.length, counter.getSent(), 0L);
|
||||
assertTrue(failed.get());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new B2DeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.box;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -46,7 +46,7 @@ public class BoxAttributesFinderFeatureTest extends AbstractBoxTest {
|
||||
f.find(test);
|
||||
}
|
||||
finally {
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BoxAttributesFinderFeatureTest extends AbstractBoxTest {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -110,6 +110,6 @@ public class BoxAttributesFinderFeatureTest extends AbstractBoxTest {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.box;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -50,8 +50,8 @@ public class BoxCopyFeatureTest extends AbstractBoxTest {
|
||||
new BoxCopyFeature(session, fileid).copy(test, copy, new TransferStatus(), ConnectionCallback.noop, StreamListener.noop);
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(test.withAttributes(PathAttributes.EMPTY)));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(copy.withAttributes(PathAttributes.EMPTY)));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,7 +67,7 @@ public class BoxCopyFeatureTest extends AbstractBoxTest {
|
||||
final Find find = new DefaultFindFeature(session);
|
||||
assertTrue(find.find(test));
|
||||
assertTrue(find.find(copy));
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -82,7 +82,7 @@ public class BoxCopyFeatureTest extends AbstractBoxTest {
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(file));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(copy));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(new Path(copy, name, EnumSet.of(Path.Type.file))));
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(copy, directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(copy, directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
@@ -90,6 +90,6 @@ public class BoxCopyFeatureTest extends AbstractBoxTest {
|
||||
final BoxFileidProvider fileid = new BoxFileidProvider(session);
|
||||
final Path test = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new BoxCopyFeature(session, fileid).copy(test, new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus(),
|
||||
new DisabledLoginCallback(), StreamListener.noop);
|
||||
LoginCallback.noop, StreamListener.noop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.box;
|
||||
import ch.cyberduck.core.AbstractPath;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -44,7 +44,7 @@ public class BoxDeleteFeatureTest extends AbstractBoxTest {
|
||||
public void testDeleteNotFound() throws Exception {
|
||||
final Path test = new Path(new DefaultHomeFinderService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
|
||||
final BoxFileidProvider fileid = new BoxFileidProvider(session);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonMap(test, new TransferStatus()), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonMap(test, new TransferStatus()), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -53,7 +53,7 @@ public class BoxDeleteFeatureTest extends AbstractBoxTest {
|
||||
final Path directory = new BoxDirectoryFeature(session, fileid).mkdir(new BoxWriteFeature(session, fileid), new Path(
|
||||
new AlphanumericRandomStringService().random(), EnumSet.of(AbstractPath.Type.directory)), new TransferStatus());
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(directory, new DisabledListProgressListener()));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse((new BoxFindFeature(session, fileid).find(directory, new DisabledListProgressListener())));
|
||||
}
|
||||
|
||||
@@ -65,11 +65,11 @@ public class BoxDeleteFeatureTest extends AbstractBoxTest {
|
||||
final Path file2 = new BoxTouchFeature(session, fileid).touch(new BoxWriteFeature(session, fileid), new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(file1));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(file2));
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(file1, file2), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Arrays.asList(file1, file2), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse((new BoxFindFeature(session, fileid).find(file1, new DisabledListProgressListener())));
|
||||
assertFalse((new BoxFindFeature(session, fileid).find(file2, new DisabledListProgressListener())));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(folder, new DisabledListProgressListener()));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse((new BoxFindFeature(session, fileid).find(folder, new DisabledListProgressListener())));
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.box;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.ConflictException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -46,7 +46,7 @@ public class BoxDirectoryFeatureTest extends AbstractBoxTest {
|
||||
assertEquals(0L, folder.attributes().getSize());
|
||||
assertNotEquals(-1L, folder.attributes().getModificationDate());
|
||||
assertThrows(ConflictException.class, () -> new BoxDirectoryFeature(session, fileid).mkdir(new BoxWriteFeature(session, fileid), folder, new TransferStatus()));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new DefaultFindFeature(session).find(folder));
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.box;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -65,6 +65,6 @@ public class BoxFileidProviderTest extends AbstractBoxTest {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new BoxDeleteFeature(session, nodeid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, nodeid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.box;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.shared.DefaultHomeFinderService;
|
||||
@@ -54,7 +54,7 @@ public class BoxFindFeatureTest extends AbstractBoxTest {
|
||||
new BoxWriteFeature(session, fileid), new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(folder));
|
||||
assertFalse(new BoxFindFeature(session, fileid).find(new Path(folder.getAbsolute(), EnumSet.of(Path.Type.file))));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -64,6 +64,6 @@ public class BoxFindFeatureTest extends AbstractBoxTest {
|
||||
new BoxTouchFeature(session, fileid).touch(new BoxWriteFeature(session, fileid), file, new TransferStatus());
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(file));
|
||||
assertFalse(new BoxFindFeature(session, fileid).find(new Path(file.getAbsolute(), EnumSet.of(Path.Type.directory))));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,8 @@ import ch.cyberduck.core.AbstractPath;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.box.io.swagger.client.model.File;
|
||||
@@ -69,7 +69,7 @@ public class BoxLargeUploadServiceTest extends AbstractBoxTest {
|
||||
final byte[] compare = new byte[content.length];
|
||||
IOUtils.readFully(new BoxReadFeature(session, fileid).read(file, new TransferStatus().setLength(content.length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(container), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.box;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -56,7 +56,7 @@ public class BoxMoveFeatureTest extends AbstractBoxTest {
|
||||
assertNotEquals(test.attributes().getETag(), target.attributes().getETag());
|
||||
assertEquals(target.attributes(), new BoxAttributesFinderFeature(session, fileid).find(target));
|
||||
assertEquals(Comparison.equal, session.getHost().getProtocol().getFeature(ComparisonService.class).compare(Path.Type.file, test.attributes(), target.attributes()));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -68,7 +68,7 @@ public class BoxMoveFeatureTest extends AbstractBoxTest {
|
||||
new BoxMoveFeature(session, fileid).move(test, target, new TransferStatus(), new Delete.DisabledCallback(), ConnectionCallback.noop);
|
||||
assertFalse(new BoxFindFeature(session, fileid).find(test.withAttributes(PathAttributes.EMPTY)));
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(target));
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -84,7 +84,7 @@ public class BoxMoveFeatureTest extends AbstractBoxTest {
|
||||
assertTrue(new BoxFindFeature(session, fileid).find(override));
|
||||
assertEquals(test.attributes().getModificationDate(), override.attributes().getModificationDate());
|
||||
assertEquals(test.attributes().getChecksum(), override.attributes().getChecksum());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
@@ -101,6 +101,6 @@ public class BoxMoveFeatureTest extends AbstractBoxTest {
|
||||
final Path file = new BoxTouchFeature(session, fileid).touch(new BoxWriteFeature(session, fileid), new Path(new DefaultHomeFinderService(session).find(), StringUtils.capitalize(name), EnumSet.of(Path.Type.file)), new TransferStatus());
|
||||
final Path rename = new Path(new DefaultHomeFinderService(session).find(), StringUtils.lowerCase(name), EnumSet.of(Path.Type.file));
|
||||
new BoxMoveFeature(session, fileid).move(file, rename, new TransferStatus().setExists(true), new Delete.DisabledCallback(), ConnectionCallback.noop);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(rename), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(rename), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package ch.cyberduck.core.box;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -43,7 +43,7 @@ public class BoxReadFeatureTest extends AbstractBoxTest {
|
||||
final InputStream in = new BoxReadFeature(session, fileid).read(test, new TransferStatus().setLength(0L), ConnectionCallback.noop);
|
||||
assertNotNull(in);
|
||||
in.close();
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
session.close();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class BoxReadFeatureTest extends AbstractBoxTest {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
session.close();
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ public class BoxReadFeatureTest extends AbstractBoxTest {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.<Path>singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.box;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.MimeTypeService;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
@@ -91,6 +91,6 @@ public class BoxWriteFeatureTest extends AbstractBoxTest {
|
||||
assertNotEquals(file.attributes().getModificationDate(), fileAttr.getModificationDate());
|
||||
assertEquals(1503654615000L, fileAttr.getCreationDate()); //milliseconds are ignored by the Box - GMT: Friday, 25. August 2017 09:50:14
|
||||
assertEquals(1503654614000L, fileAttr.getModificationDate()); //milliseconds are ignored by the Box - GMT: Friday, 25. August 2017 09:50:14
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.box;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.io.StatusOutputStream;
|
||||
@@ -64,7 +64,7 @@ public class BufferWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,7 +102,7 @@ public class BufferWriteFeatureTest extends AbstractBoxTest {
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
}
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -123,7 +123,7 @@ public class BufferWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -144,6 +144,6 @@ public class BufferWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ import ch.cyberduck.core.AbstractPath;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.box.AbstractBoxTest;
|
||||
@@ -108,7 +108,7 @@ public class BoxThresholdUploadServiceTest extends AbstractBoxTest {
|
||||
final InputStream in = new CryptoReadFeature(session, new BoxReadFeature(session, fileid), cryptomator).read(test, readStatus, ConnectionCallback.noop);
|
||||
new StreamCopier(readStatus, readStatus).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.box.AbstractBoxTest;
|
||||
import ch.cyberduck.core.box.BoxDeleteFeature;
|
||||
@@ -90,7 +90,7 @@ public class BoxWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -124,6 +124,6 @@ public class BoxWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.box.AbstractBoxTest;
|
||||
import ch.cyberduck.core.box.BoxDeleteFeature;
|
||||
@@ -90,6 +90,6 @@ public class BufferWriteFeatureTest extends AbstractBoxTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BoxDeleteFeature(session, fileid)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ import ch.cyberduck.core.CertificateStoreFactory;
|
||||
import ch.cyberduck.core.DefaultIOExceptionMappingService;
|
||||
import ch.cyberduck.core.DisabledCertificateIdentityCallback;
|
||||
import ch.cyberduck.core.DisabledCertificateTrustCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledTranscriptListener;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.HostPasswordStore;
|
||||
import ch.cyberduck.core.HostUrlProvider;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.PasswordStoreFactory;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.features.Pairing;
|
||||
@@ -70,7 +70,7 @@ public class BrickPairingFeature implements Pairing {
|
||||
CertificateStoreFactory.get());
|
||||
final HttpConnectionPoolBuilder builder = new HttpConnectionPoolBuilder(bookmark,
|
||||
new ThreadLocalHostnameDelegatingTrustManager(trust, bookmark.getHostname()), key, ProxyFactory.get());
|
||||
final HttpClientBuilder configuration = builder.build(ProxyFactory.get(), new DisabledTranscriptListener(), new DisabledLoginCallback());
|
||||
final HttpClientBuilder configuration = builder.build(ProxyFactory.get(), new DisabledTranscriptListener(), LoginCallback.noop);
|
||||
configuration.setDefaultAuthSchemeRegistry(RegistryBuilder.<AuthSchemeProvider>create().build());
|
||||
final CloseableHttpClient client = configuration.build();
|
||||
final HttpRequestBase resource = new HttpDelete(
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.Protocol;
|
||||
@@ -46,7 +46,7 @@ public class BrickAttributesFinderFeatureTest extends AbstractBrickTest {
|
||||
f.find(test);
|
||||
}
|
||||
finally {
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BrickAttributesFinderFeatureTest extends AbstractBrickTest {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -107,6 +107,6 @@ public class BrickAttributesFinderFeatureTest extends AbstractBrickTest {
|
||||
catch(NotfoundException e) {
|
||||
// Expected
|
||||
}
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.brick;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -52,8 +52,8 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
new BrickCopyFeature(session).copy(test, copy, new TransferStatus(), ConnectionCallback.noop, StreamListener.noop);
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(copy));
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -64,15 +64,15 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
local.delete();
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
final Path copy = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new BrickCopyFeature(session).copy(test, copy, new TransferStatus(), ConnectionCallback.noop, StreamListener.noop);
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(copy));
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.<Path>singletonList(copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,7 +85,7 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
local.delete();
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
final Path copy = new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
@@ -94,7 +94,7 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
final Find find = new DefaultFindFeature(session);
|
||||
assertTrue(find.find(test));
|
||||
assertTrue(find.find(copy));
|
||||
new BrickDeleteFeature(session).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Arrays.asList(test, copy), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -108,7 +108,7 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), file, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
local.delete();
|
||||
assertTrue(new BrickFindFeature(session).find(file));
|
||||
final Path copy = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
@@ -116,6 +116,6 @@ public class BrickCopyFeatureTest extends AbstractBrickTest {
|
||||
assertTrue(new BrickFindFeature(session).find(file));
|
||||
assertTrue(new BrickFindFeature(session).find(copy));
|
||||
assertTrue(new BrickFindFeature(session).find(new Path(copy, name, EnumSet.of(Path.Type.file))));
|
||||
new BrickDeleteFeature(session).delete(Arrays.asList(copy, directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Arrays.asList(copy, directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -51,11 +51,11 @@ public class BrickDeleteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
local.delete();
|
||||
final String lock = new BrickLockFeature(session).lock(test);
|
||||
assertNotNull(lock);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -69,9 +69,9 @@ public class BrickDeleteFeatureTest extends AbstractBrickTest {
|
||||
final Path file = new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new BrickTouchFeature(session).touch(new BrickWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(new BrickFindFeature(session).find(file));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new BrickFindFeature(session).find(folder));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(new BrickFindFeature(session).find(room));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.ConflictException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -39,6 +39,6 @@ public class BrickDirectoryFeatureTest extends AbstractBrickTest {
|
||||
final Path directory = new BrickDirectoryFeature(session).mkdir(
|
||||
new BrickWriteFeature(session), new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertThrows(ConflictException.class, () -> new BrickDirectoryFeature(session).mkdir(new BrickWriteFeature(session), directory, new TransferStatus()));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.shared.DefaultHomeFinderService;
|
||||
@@ -51,7 +51,7 @@ public class BrickFindFeatureTest extends AbstractBrickTest {
|
||||
new BrickWriteFeature(session), new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
|
||||
assertTrue(new BrickFindFeature(session).find(folder));
|
||||
assertFalse(new BrickFindFeature(session).find(new Path(folder.getAbsolute(), EnumSet.of(Path.Type.file))));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(folder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -60,6 +60,6 @@ public class BrickFindFeatureTest extends AbstractBrickTest {
|
||||
new BrickTouchFeature(session).touch(new BrickWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(new BrickFindFeature(session).find(file));
|
||||
assertFalse(new BrickFindFeature(session).find(new Path(file.getAbsolute(), EnumSet.of(Path.Type.directory))));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.brick;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -60,7 +60,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
assertEquals(test.attributes().getModificationDate(), targetAttr.getModificationDate());
|
||||
assertEquals(Comparison.equal, session.getHost().getProtocol().getFeature(ComparisonService.class).compare(Path.Type.file, test.attributes(), targetAttr));
|
||||
assertEquals(Comparison.equal, session.getHost().getProtocol().getFeature(ComparisonService.class).compare(Path.Type.file, target.attributes(), targetAttr));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -72,7 +72,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
assertFalse(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
assertEquals(test.attributes(), target.attributes());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,7 +85,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
assertEquals(test.attributes(), target.attributes());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -96,7 +96,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
local.delete();
|
||||
final String lock = new BrickLockFeature(session).lock(test);
|
||||
final Path target = new BrickMoveFeature(session).move(test,
|
||||
@@ -104,7 +104,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
assertFalse(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
assertEquals(test.attributes(), target.attributes());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -118,7 +118,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
assertFalse(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
assertTrue(new BrickFindFeature(session).find(targetFile));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -130,7 +130,7 @@ public class BrickMoveFeatureTest extends AbstractBrickTest {
|
||||
new BrickMoveFeature(session).move(test, target, new TransferStatus().setExists(true), new Delete.DisabledCallback(), ConnectionCallback.noop);
|
||||
assertFalse(new BrickFindFeature(session).find(test));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = NotfoundException.class)
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.brick;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.brick.io.swagger.client.model.FileEntity;
|
||||
@@ -69,7 +69,7 @@ public class BrickMultipartWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -97,7 +97,7 @@ public class BrickMultipartWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -125,7 +125,7 @@ public class BrickMultipartWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -149,6 +149,6 @@ public class BrickMultipartWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.brick;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.brick.io.swagger.client.model.FileEntity;
|
||||
@@ -58,7 +58,7 @@ public class BrickReadFeatureTest extends AbstractBrickTest {
|
||||
new BrickReadFeature(session).read(new Path(room, "nosuchname", EnumSet.of(Path.Type.file)), status, ConnectionCallback.noop);
|
||||
}
|
||||
finally {
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class BrickReadFeatureTest extends AbstractBrickTest {
|
||||
assertNotNull(in);
|
||||
in.close();
|
||||
}
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -119,7 +119,7 @@ public class BrickReadFeatureTest extends AbstractBrickTest {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -151,7 +151,7 @@ public class BrickReadFeatureTest extends AbstractBrickTest {
|
||||
System.arraycopy(content, 100, reference, 0, content.length - 100);
|
||||
assertArrayEquals(reference, buffer.toByteArray());
|
||||
in.close();
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -170,6 +170,6 @@ public class BrickReadFeatureTest extends AbstractBrickTest {
|
||||
final CountingInputStream in = new CountingInputStream(new BrickReadFeature(session).read(test, status, ConnectionCallback.noop));
|
||||
in.close();
|
||||
assertEquals(0L, in.getByteCount(), 0L);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(room), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Profile;
|
||||
import ch.cyberduck.core.ProtocolFactory;
|
||||
import ch.cyberduck.core.exception.ConnectionCanceledException;
|
||||
@@ -55,7 +55,7 @@ public class BrickSessionTest extends AbstractBrickTest {
|
||||
}
|
||||
};
|
||||
final BrickSession session = new BrickSession(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
|
||||
session.pair(host, ConnectionCallback.noop, new DisabledLoginCallback(), CancelCallback.noop,
|
||||
session.pair(host, ConnectionCallback.noop, LoginCallback.noop, CancelCallback.noop,
|
||||
"t", "m", new BrowserLauncher() {
|
||||
@Override
|
||||
public boolean open(final String url) {
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.brick;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -55,7 +55,7 @@ public class BrickThresholdUploadFeatureTest extends AbstractBrickTest {
|
||||
status.setLength(content.length);
|
||||
final BytecountStreamListener count = new BytecountStreamListener();
|
||||
feature.upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
assertEquals(content.length, count.getSent());
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
final PathAttributes attributes = new BrickAttributesFinderFeature(session).find(test);
|
||||
@@ -63,7 +63,7 @@ public class BrickThresholdUploadFeatureTest extends AbstractBrickTest {
|
||||
final byte[] compare = new byte[length];
|
||||
IOUtils.readFully(new BrickReadFeature(session).read(test, new TransferStatus().setLength(length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class BrickThresholdUploadFeatureTest extends AbstractBrickTest {
|
||||
status.setLength(content.length);
|
||||
final BytecountStreamListener count = new BytecountStreamListener();
|
||||
feature.upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
assertEquals(content.length, count.getSent());
|
||||
assertTrue(status.isComplete());
|
||||
assertTrue(new BrickFindFeature(session).find(test));
|
||||
@@ -90,7 +90,7 @@ public class BrickThresholdUploadFeatureTest extends AbstractBrickTest {
|
||||
final byte[] compare = new byte[length];
|
||||
IOUtils.readFully(new BrickReadFeature(session).read(test, new TransferStatus().setLength(length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.brick;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -47,7 +47,7 @@ public class BrickTimestampFeatureTest extends AbstractBrickTest {
|
||||
assertEquals(5000L, attr.getModificationDate());
|
||||
assertEquals(attr, status.getResponse());
|
||||
assertEquals(5000L, new DefaultAttributesFinderFeature(session).find(file).getModificationDate());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -57,7 +57,7 @@ public class BrickTimestampFeatureTest extends AbstractBrickTest {
|
||||
new BrickTimestampFeature(session).setTimestamp(file, 5000L);
|
||||
assertEquals(5000L, new BrickAttributesFinderFeature(session).find(file).getModificationDate());
|
||||
assertEquals(5000L, new DefaultAttributesFinderFeature(session).find(file).getModificationDate());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.brick;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -57,7 +57,7 @@ public class BrickUploadFeatureTest extends AbstractBrickTest {
|
||||
status.setMime("text/plain");
|
||||
final BytecountStreamListener count = new BytecountStreamListener();
|
||||
feature.upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
assertEquals(content.length, count.getSent());
|
||||
assertTrue(status.isComplete());
|
||||
assertNotSame(PathAttributes.EMPTY, status.getResponse());
|
||||
@@ -67,7 +67,7 @@ public class BrickUploadFeatureTest extends AbstractBrickTest {
|
||||
final byte[] compare = new byte[length];
|
||||
IOUtils.readFully(new BrickReadFeature(session).read(test, new TransferStatus().setLength(length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class BrickUploadFeatureTest extends AbstractBrickTest {
|
||||
status.setMime("text/plain");
|
||||
final BytecountStreamListener count = new BytecountStreamListener();
|
||||
feature.upload(new BrickWriteFeature(session), test, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, count, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, count, status, LoginCallback.noop);
|
||||
assertEquals(content.length, count.getSent());
|
||||
assertTrue(status.isComplete());
|
||||
assertNotSame(PathAttributes.EMPTY, status.getResponse());
|
||||
@@ -96,7 +96,7 @@ public class BrickUploadFeatureTest extends AbstractBrickTest {
|
||||
final byte[] compare = new byte[length];
|
||||
IOUtils.readFully(new BrickReadFeature(session).read(test, new TransferStatus().setLength(length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class BrickUploadFeatureTest extends AbstractBrickTest {
|
||||
final byte[] compare = new byte[length];
|
||||
IOUtils.readFully(new BrickReadFeature(session).read(test, new TransferStatus().setLength(length), ConnectionCallback.noop), compare);
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.brick;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.BytecountStreamListener;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathAttributes;
|
||||
import ch.cyberduck.core.brick.io.swagger.client.model.FileEntity;
|
||||
@@ -70,7 +70,7 @@ public class BrickWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -97,7 +97,7 @@ public class BrickWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -124,7 +124,7 @@ public class BrickWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -147,6 +147,6 @@ public class BrickWriteFeatureTest extends AbstractBrickTest {
|
||||
IOUtils.readFully(stream, compare);
|
||||
stream.close();
|
||||
assertArrayEquals(content, compare);
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new BrickDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.brick.cryptomator;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.brick.AbstractBrickTest;
|
||||
import ch.cyberduck.core.brick.BrickDeleteFeature;
|
||||
@@ -65,6 +65,6 @@ public class BrickListServiceTest extends AbstractBrickTest {
|
||||
new CryptoTouchFeature<>(session, new DefaultTouchFeature<FileEntity>(session), cryptomator).touch(
|
||||
new CryptoWriteFeature<>(session, new BrickWriteFeature(session), cryptomator), test, new TransferStatus());
|
||||
Assert.assertEquals(test, new CryptoListService(session, new BrickListService(session), cryptomator).list(vault, new DisabledListProgressListener()).get(0));
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ package ch.cyberduck.core.cryptomator;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.brick.AbstractBrickTest;
|
||||
import ch.cyberduck.core.brick.BrickDeleteFeature;
|
||||
@@ -64,7 +64,7 @@ public class DefaultTouchFeatureTest extends AbstractBrickTest {
|
||||
new CryptoWriteFeature<>(session, new BrickWriteFeature(session), cryptomator), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.file)), status);
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, status.getResponse().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new BrickFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -80,6 +80,6 @@ public class DefaultTouchFeatureTest extends AbstractBrickTest {
|
||||
new CryptoWriteFeature<>(session, new BrickWriteFeature(session), cryptomator), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.file)), status);
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, status.getResponse().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new BrickDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.worker;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -59,13 +59,13 @@ public class CopyWorkerTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), source, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
assertTrue(new BrickFindFeature(session).find(source));
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(new BrickFindFeature(session).find(source));
|
||||
assertTrue(new BrickFindFeature(session).find(target));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(source, target), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(source, target), ProgressListener.noop).run(session);
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class CopyWorkerTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), sourceFile, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
assertTrue(new BrickFindFeature(session).find(sourceFile));
|
||||
final Path targetFolder = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
final Path targetFile = new Path(targetFolder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
@@ -90,7 +90,7 @@ public class CopyWorkerTest extends AbstractBrickTest {
|
||||
worker.run(session);
|
||||
assertTrue(new BrickFindFeature(session).find(sourceFile));
|
||||
assertTrue(new BrickFindFeature(session).find(targetFile));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(sourceFile, targetFolder), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(sourceFile, targetFolder), ProgressListener.noop).run(session);
|
||||
local.delete();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class CopyWorkerTest extends AbstractBrickTest {
|
||||
IOUtils.write(random, local.getOutputStream(false));
|
||||
final TransferStatus status = new TransferStatus().setLength(random.length);
|
||||
new BrickUploadFeature(session).upload(new BrickWriteFeature(session), sourceFile, local, new BandwidthThrottle(BandwidthThrottle.UNLIMITED),
|
||||
ProgressListener.noop, StreamListener.noop, status, new DisabledLoginCallback());
|
||||
ProgressListener.noop, StreamListener.noop, status, LoginCallback.noop);
|
||||
assertTrue(new BrickFindFeature(session).find(folder));
|
||||
assertTrue(new BrickFindFeature(session).find(sourceFile));
|
||||
final Path targetFolder = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
@@ -116,7 +116,7 @@ public class CopyWorkerTest extends AbstractBrickTest {
|
||||
assertTrue(new BrickFindFeature(session).find(targetFile));
|
||||
assertTrue(new BrickFindFeature(session).find(folder));
|
||||
assertTrue(new BrickFindFeature(session).find(sourceFile));
|
||||
new DeleteWorker(new DisabledLoginCallback(), Arrays.asList(folder, targetFile), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Arrays.asList(folder, targetFile), ProgressListener.noop).run(session);
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ package ch.cyberduck.core;
|
||||
import ch.cyberduck.core.exception.LoginCanceledException;
|
||||
|
||||
public interface LoginCallback extends ConnectionCallback {
|
||||
LoginCallback noop = new DisabledLoginCallback();
|
||||
|
||||
/**
|
||||
* Call this to allow the user to reenter the new login credentials.
|
||||
|
||||
@@ -50,7 +50,7 @@ public class LoginCallbackFactory extends Factory<LoginCallback> {
|
||||
}
|
||||
catch(InstantiationException | InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
|
||||
log.error("Failure loading callback class {}. {}", clazz, e.getMessage());
|
||||
return new DisabledLoginCallback();
|
||||
return LoginCallback.noop;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ import ch.cyberduck.core.CertificateStoreFactory;
|
||||
import ch.cyberduck.core.DefaultIOExceptionMappingService;
|
||||
import ch.cyberduck.core.DisabledCertificateIdentityCallback;
|
||||
import ch.cyberduck.core.DisabledCertificateTrustCallback;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledTranscriptListener;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.HostUrlProvider;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.exception.ConnectionCanceledException;
|
||||
import ch.cyberduck.core.http.DefaultHttpResponseExceptionMappingService;
|
||||
@@ -84,7 +84,7 @@ public class HttpReachability implements Reachability {
|
||||
final HttpConnectionPoolBuilder builder = new HttpConnectionPoolBuilder(bookmark,
|
||||
new ThreadLocalHostnameDelegatingTrustManager(trust, bookmark.getHostname()), key, Reachability.timeout, proxy);
|
||||
final HttpClientBuilder configuration = builder.build(proxy,
|
||||
new DisabledTranscriptListener(), new DisabledLoginCallback());
|
||||
new DisabledTranscriptListener(), LoginCallback.noop);
|
||||
configuration.disableRedirectHandling();
|
||||
configuration.disableAutomaticRetries();
|
||||
try (CloseableHttpClient client = configuration.build()) {
|
||||
|
||||
@@ -18,11 +18,11 @@ package ch.cyberduck.core.editor;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DefaultIOExceptionMappingService;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LocaleFactory;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
import ch.cyberduck.core.Session;
|
||||
@@ -100,7 +100,7 @@ public class EditOpenWorker extends Worker<Transfer> {
|
||||
final SingleTransferWorker worker
|
||||
= new SingleTransferWorker(session, session, download, options, new TransferSpeedometer(download),
|
||||
new DisabledTransferPrompt(), new DisabledTransferErrorCallback(),
|
||||
listener, StreamListener.noop, new DisabledLoginCallback(), notification);
|
||||
listener, StreamListener.noop, LoginCallback.noop, notification);
|
||||
worker.run(session);
|
||||
if(!download.isComplete()) {
|
||||
log.warn("File size changed for {}", file);
|
||||
|
||||
@@ -17,11 +17,11 @@ package ch.cyberduck.core.editor;
|
||||
* Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.Local;
|
||||
import ch.cyberduck.core.LocaleFactory;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.NullFilter;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -84,7 +84,7 @@ public class EditSaveWorker extends Worker<Transfer> {
|
||||
final SingleTransferWorker worker
|
||||
= new SingleTransferWorker(session, session, upload, new TransferOptions(),
|
||||
new TransferSpeedometer(upload), new DisabledTransferPrompt(), callback,
|
||||
listener, StreamListener.noop, new DisabledLoginCallback(), notification);
|
||||
listener, StreamListener.noop, LoginCallback.noop, notification);
|
||||
worker.run(session);
|
||||
if(!upload.isComplete()) {
|
||||
log.warn("File size changed for {}", file);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class KeychainLoginServiceTest {
|
||||
throw new LoginCanceledException();
|
||||
}
|
||||
};
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
LoginService l = new KeychainLoginService(new DisabledPasswordStore());
|
||||
l.authenticate(session, new ProgressListener() {
|
||||
int i = 0;
|
||||
@@ -45,7 +45,7 @@ public class KeychainLoginServiceTest {
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}, new DisabledLoginCallback(), CancelCallback.noop);
|
||||
}, LoginCallback.noop, CancelCallback.noop);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class KeychainLoginServiceTest {
|
||||
public void testCancel() throws Exception {
|
||||
LoginService l = new KeychainLoginService(new DisabledPasswordStore());
|
||||
l.validate(new Host(new TestProtocol(), "h"),
|
||||
new DefaultX509KeyManager(), new DisabledLoginCallback(), new LoginOptions());
|
||||
new DefaultX509KeyManager(), LoginCallback.noop, new LoginOptions());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,7 +70,7 @@ public class KeychainLoginServiceTest {
|
||||
final Credentials credentials = new Credentials();
|
||||
credentials.setUsername("u");
|
||||
final Host host = new Host(new TestProtocol(), "test.cyberduck.ch", credentials);
|
||||
l.validate(host, new DefaultX509KeyManager(), new DisabledLoginCallback(), new LoginOptions(host.getProtocol()));
|
||||
l.validate(host, new DefaultX509KeyManager(), LoginCallback.noop, new LoginOptions(host.getProtocol()));
|
||||
assertTrue(keychain.get());
|
||||
assertFalse(host.getCredentials().isSaved());
|
||||
assertEquals("P", host.getCredentials().getPassword());
|
||||
|
||||
@@ -28,7 +28,7 @@ public class LoginConnectionServiceTest {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
final LoginConnectionService s = new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop,
|
||||
final LoginConnectionService s = new LoginConnectionService(LoginCallback.noop, new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop,
|
||||
new DisabledProxyFinder() {
|
||||
@Override
|
||||
public Proxy find(final String target) {
|
||||
@@ -46,7 +46,7 @@ public class LoginConnectionServiceTest {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
final LoginConnectionService s = new LoginConnectionService(new DisabledLoginCallback(), new HostKeyCallback() {
|
||||
final LoginConnectionService s = new LoginConnectionService(LoginCallback.noop, new HostKeyCallback() {
|
||||
@Override
|
||||
public boolean verify(final Host hostname, final PublicKey key) {
|
||||
assertEquals(Session.State.opening, session.getState());
|
||||
@@ -81,7 +81,7 @@ public class LoginConnectionServiceTest {
|
||||
|
||||
@Test(expected = ConnectionCanceledException.class)
|
||||
public void testNoHostname() throws Exception {
|
||||
final LoginConnectionService s = new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(),
|
||||
final LoginConnectionService s = new LoginConnectionService(LoginCallback.noop, new DisabledHostKeyCallback(), new DisabledPasswordStore(),
|
||||
ProgressListener.noop);
|
||||
s.check(new NullSession(new Host(new TestProtocol(), "")), CancelCallback.noop);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import ch.cyberduck.core.threading.CancelCallback;
|
||||
|
||||
public class TestLoginConnectionService extends LoginConnectionService {
|
||||
public TestLoginConnectionService() {
|
||||
super(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop);
|
||||
super(LoginCallback.noop, new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user