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:
@@ -19,9 +19,9 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
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.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -91,8 +91,8 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
new StreamCopier(new TransferStatus(), new TransferStatus()).transfer(new ByteArrayInputStream(content), new CryptoWriteFeature<>(session, new FTPWriteFeature(session), cryptomator).write(source, status.setLength(content.length), ConnectionCallback.noop));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
@@ -102,7 +102,7 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
assertEquals(content.length, IOUtils.copy(in, out));
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
in.close();
|
||||
new DeleteWorker(new DisabledLoginCallback(), Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
new DeleteWorker(LoginCallback.noop, Collections.singletonList(vault), ProgressListener.noop).run(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -123,14 +123,14 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
new CryptoWriteFeature<>(session, new FTPWriteFeature(session), cryptomator), targetFolder, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(targetFolder));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
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
|
||||
@@ -152,14 +152,14 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
new CryptoWriteFeature<>(session, new FTPWriteFeature(session), cryptomator), targetFolder, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(targetFolder));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
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,8 +181,8 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
// copy file
|
||||
final Path fileRenamed = new Path(folder, "f1", EnumSet.of(Path.Type.file));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
new CopyWorker(Collections.singletonMap(file, fileRenamed), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop).run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(fileRenamed));
|
||||
@@ -194,7 +194,7 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
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
|
||||
@@ -216,14 +216,14 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
// copy file into vault
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(cleartextFile, encryptedFile), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(new DefaultFindFeature(session).find(cleartextFile));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).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
|
||||
@@ -245,8 +245,8 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
final Path encryptedFolder = new Path(vault, cleartextFolder.getName(), EnumSet.of(Path.Type.directory));
|
||||
final Path encryptedFile = new Path(encryptedFolder, cleartextFile.getName(), EnumSet.of(Path.Type.file));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(cleartextFolder, encryptedFolder), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
@@ -254,7 +254,7 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
assertTrue(new DefaultFindFeature(session).find(cleartextFolder));
|
||||
assertTrue(new DefaultFindFeature(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
|
||||
@@ -278,14 +278,14 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
// move file outside vault
|
||||
final Path cleartextFile = new Path(clearFolder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(encryptedFile, cleartextFile), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFile));
|
||||
assertTrue(new DefaultFindFeature(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
|
||||
@@ -307,8 +307,8 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
// copy directory outside vault
|
||||
final Path cleartextFolder = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(encryptedFolder, cleartextFolder), new SessionPool.SingleSessionPool(copySession, registry), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
@@ -317,6 +317,6 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
final Path fileRenamed = new Path(cleartextFolder, encryptedFile.getName(), EnumSet.of(Path.Type.file));
|
||||
assertTrue(new DefaultFindFeature(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;
|
||||
@@ -101,7 +101,7 @@ public class CryptoFTPSingleTransferWorkerTest extends AbstractFTPTest {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(),
|
||||
ProgressListener.noop, StreamListener.noop, new DisabledLoginCallback(), new DisabledNotificationService()) {
|
||||
ProgressListener.noop, StreamListener.noop, LoginCallback.noop, new DisabledNotificationService()) {
|
||||
|
||||
}.run(session));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(dir1));
|
||||
@@ -119,7 +119,7 @@ public class CryptoFTPSingleTransferWorkerTest extends AbstractFTPTest {
|
||||
new StreamCopier(new TransferStatus(), new TransferStatus()).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
}
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(file1, file2, dir1, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).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.features.Delete;
|
||||
import ch.cyberduck.core.features.Directory;
|
||||
@@ -67,7 +67,7 @@ public class FTPDirectoryFeatureTest extends AbstractFTPTest {
|
||||
cryptomator.getFeature(session, Write.class, new FTPWriteFeature(session)), testdirectory2, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(testdirectory2));
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(testfile2));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(testdirectory2, testdirectory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(testdirectory2, testdirectory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -82,6 +82,6 @@ public class FTPDirectoryFeatureTest extends AbstractFTPTest {
|
||||
cryptomator.getFeature(session, Directory.class, new FTPDirectoryFeature(session)).mkdir(
|
||||
cryptomator.getFeature(session, Write.class, new FTPWriteFeature(session)), test, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.Cache;
|
||||
import ch.cyberduck.core.CachingFindFeature;
|
||||
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.PathCache;
|
||||
import ch.cyberduck.core.cryptomator.features.CryptoFindFeature;
|
||||
@@ -101,6 +101,6 @@ public class FTPListServiceTest extends AbstractFTPTest {
|
||||
assertTrue(f.getType().contains(Path.Type.decrypted));
|
||||
}
|
||||
}
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(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.cryptomator.features.CryptoTouchFeature;
|
||||
import ch.cyberduck.core.cryptomator.features.CryptoWriteFeature;
|
||||
@@ -82,6 +82,6 @@ public class FTPMoveFeatureTest extends AbstractFTPTest {
|
||||
final Path fileRenamedInRenamedFolder = new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(fileRenamedInRenamedFolder));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(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.cryptomator.features.CryptoTouchFeature;
|
||||
import ch.cyberduck.core.cryptomator.features.CryptoWriteFeature;
|
||||
@@ -68,7 +68,7 @@ public class FTPTouchFeatureTest extends AbstractFTPTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
assertEquals(0L, cryptomator.getFeature(session, AttributesFinder.class, new FTPAttributesFinderFeature(session)).find(test).getSize());
|
||||
assertEquals(0L, cryptomator.getFeature(session, AttributesFinder.class, new DefaultAttributesFinderFeature(session)).find(test).getSize());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -84,7 +84,7 @@ public class FTPTouchFeatureTest extends AbstractFTPTest {
|
||||
new CryptoWriteFeature<>(session, new FTPWriteFeature(session), cryptomator), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.file)), status);
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, test.attributes().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,6 +100,6 @@ public class FTPTouchFeatureTest extends AbstractFTPTest {
|
||||
new CryptoWriteFeature<>(session, new FTPWriteFeature(session), cryptomator), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.file)), status);
|
||||
assertEquals(TransferStatus.UNKNOWN_LENGTH, test.attributes().getSize());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(test));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(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.cryptomator.features.CryptoListService;
|
||||
@@ -93,6 +93,6 @@ public class FTPWriteFeatureTest extends AbstractFTPTest {
|
||||
final InputStream in = new CryptoReadFeature(session, new FTPReadFeature(session), cryptomator).read(test, new TransferStatus(), ConnectionCallback.noop);
|
||||
new StreamCopier(status, status).transfer(in, buffer);
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(test, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.Credentials;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordCallback;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -80,11 +80,11 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
session), cryptomator).touch(
|
||||
cryptomator.getFeature(session, Write.class, new FTPWriteFeature(session)), source, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(target, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(target, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -105,11 +105,11 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
cryptomator.getFeature(session, Write.class, new FTPWriteFeature(session)), targetFolder, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(targetFolder));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session),
|
||||
PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(target, targetFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(target, targetFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -131,11 +131,11 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
cryptomator.getFeature(session, Directory.class, new FTPDirectoryFeature(session)).mkdir(
|
||||
cryptomator.getFeature(session, Write.class, new FTPWriteFeature(session)), targetFolder, new TransferStatus());
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(targetFolder));
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(source));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(target));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(sourceFolder, target, targetFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(sourceFolder, target, targetFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -155,12 +155,12 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(file));
|
||||
// rename file
|
||||
final Path fileRenamed = new Path(folder, "f1", EnumSet.of(Path.Type.file));
|
||||
new MoveWorker(Collections.singletonMap(file, fileRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback()).run(session);
|
||||
new MoveWorker(Collections.singletonMap(file, fileRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop).run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(file));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(fileRenamed));
|
||||
// rename folder
|
||||
final Path folderRenamed = new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
new MoveWorker(Collections.singletonMap(folder, folderRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback()).run(session);
|
||||
new MoveWorker(Collections.singletonMap(folder, folderRenamed), new SessionPool.SingleSessionPool(session), PathCache.empty(), ProgressListener.noop, LoginCallback.noop).run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(folder));
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(folderRenamed));
|
||||
try {
|
||||
@@ -171,7 +171,7 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
}
|
||||
assertEquals(1, new CryptoListService(session, new FTPListService(session), cryptomator).list(folderRenamed, new DisabledListProgressListener()).size());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(
|
||||
new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file)), folderRenamed), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new Path(folderRenamed, "f1", EnumSet.of(Path.Type.file)), folderRenamed), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -193,13 +193,13 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
assertTrue(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
// move file into vault
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFile, encryptedFile), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFile, encryptedFile), new SessionPool.SingleSessionPool(copySession), 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 FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -221,15 +221,15 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
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 FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFolder, encryptedFolder), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(clearFolder, encryptedFolder), new SessionPool.SingleSessionPool(copySession), 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 FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFile, encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -254,14 +254,14 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
// move file outside vault
|
||||
final Path fileRenamed = new Path(clearFolder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFile, fileRenamed), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFile, fileRenamed), new SessionPool.SingleSessionPool(copySession), 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 FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFolder, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Arrays.asList(fileRenamed, clearFolder), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Arrays.asList(encryptedFolder, vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Arrays.asList(fileRenamed, clearFolder), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
|
||||
@@ -284,17 +284,17 @@ public class MoveWorkerTest extends AbstractFTPTest {
|
||||
// move directory outside vault
|
||||
final Path directoryRenamed = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFolder, directoryRenamed), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, new DisabledLoginCallback());
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final MoveWorker worker = new MoveWorker(Collections.singletonMap(encryptedFolder, directoryRenamed), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, LoginCallback.noop);
|
||||
worker.run(session);
|
||||
assertFalse(cryptomator.getFeature(session, Find.class, new DefaultFindFeature(session)).find(encryptedFolder));
|
||||
assertThrows(NotfoundException.class, () -> new DefaultFindFeature(session).find(encryptedFile));
|
||||
assertTrue(new DefaultFindFeature(session).find(directoryRenamed));
|
||||
final Path fileRenamed = new Path(directoryRenamed, encryptedFile.getName(), EnumSet.of(Path.Type.file));
|
||||
assertTrue(new DefaultFindFeature(session).find(fileRenamed));
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Collections.singletonList(vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Arrays.asList(fileRenamed, directoryRenamed), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
cryptomator.getFeature(session, Delete.class, new FTPDeleteFeature(session)).delete(Collections.singletonList(vault), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Arrays.asList(fileRenamed, directoryRenamed), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
registry.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ package ch.cyberduck.core.ftp;
|
||||
|
||||
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.Path;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.preferences.PreferencesFactory;
|
||||
@@ -55,10 +55,10 @@ public class DataConnectionActionExecutorTest extends AbstractFTPTest {
|
||||
final AtomicInteger count = new AtomicInteger();
|
||||
|
||||
final FTPSession session = new FTPSession(host);
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
session.getClient().setDefaultTimeout(2000);
|
||||
session.getClient().setConnectTimeout(2000);
|
||||
session.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final Path file = new Path("/pub/debian/README.html", EnumSet.of(Path.Type.file));
|
||||
final TransferStatus status = new TransferStatus();
|
||||
final DataConnectionAction<InputStream> action = new DataConnectionAction<InputStream>() {
|
||||
|
||||
@@ -19,7 +19,7 @@ package ch.cyberduck.core.ftp;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.Attributes;
|
||||
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.InteroperabilityException;
|
||||
@@ -61,6 +61,6 @@ public class FTPAttributesFinderFeatureTest extends AbstractFTPTest {
|
||||
catch(NotfoundException | InteroperabilityException e) {
|
||||
// Expected
|
||||
}
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.ftp;
|
||||
* Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.AccessDeniedException;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -41,7 +41,7 @@ public class FTPDeleteFeatureTest extends AbstractFTPTest {
|
||||
public void testDeleteNotFound() throws Exception {
|
||||
final Path test = new Path(new FTPWorkdirService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
|
||||
try {
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
fail();
|
||||
}
|
||||
catch(NotfoundException | AccessDeniedException e) {
|
||||
@@ -53,6 +53,6 @@ public class FTPDeleteFeatureTest extends AbstractFTPTest {
|
||||
public void testDeleteDirectory() throws Exception {
|
||||
final Path test = new Path(new FTPWorkdirService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.directory));
|
||||
new FTPDirectoryFeature(session).mkdir(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.ftp;
|
||||
* Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -43,7 +43,7 @@ public class FTPDirectoryFeatureTest extends AbstractFTPTest {
|
||||
new FTPDirectoryFeature(session).mkdir(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
assertTrue(session.getFeature(Find.class).find(test));
|
||||
assertThrows(ConflictException.class, () -> new FTPDirectoryFeature(session).mkdir(new FTPWriteFeature(session), test, new TransferStatus()));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(session.getFeature(Find.class).find(test));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.ftp;
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -52,7 +52,7 @@ public class FTPFindFeatureTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(new FTPFindFeature(session).find(file));
|
||||
assertFalse(new FTPFindFeature(session).find(new Path(file.getAbsolute(), EnumSet.of(Path.Type.directory))));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,7 @@ package ch.cyberduck.core.ftp;
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -41,6 +41,6 @@ public class FTPMDTMTimestampFeatureTest extends AbstractFTPTest {
|
||||
final Path test = new Path(new FTPWorkdirService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
assertThrows(BackgroundException.class, () -> new FTPMDTMTimestampFeature(session).setTimestamp(test, modified));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.ftp;
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
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.ftp.list.FTPListService;
|
||||
@@ -45,6 +45,6 @@ public class FTPMFMTTimestampFeatureTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
new FTPMFMTTimestampFeature(session).setTimestamp(test, modified);
|
||||
assertEquals(modified / 1000 * 1000, new FTPListService(session).list(home, new DisabledListProgressListener()).get(test).attributes().getModificationDate());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package ch.cyberduck.core.ftp;
|
||||
*/
|
||||
|
||||
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.AccessDeniedException;
|
||||
import ch.cyberduck.core.exception.NotfoundException;
|
||||
@@ -49,7 +49,7 @@ public class FTPMoveFeatureTest extends AbstractFTPTest {
|
||||
new FTPMoveFeature(session).move(test, target, new TransferStatus(), new Delete.DisabledCallback(), ConnectionCallback.noop);
|
||||
assertFalse(session.getFeature(Find.class).find(test));
|
||||
assertTrue(session.getFeature(Find.class).find(target));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -69,7 +69,7 @@ public class FTPMoveFeatureTest extends AbstractFTPTest {
|
||||
new FTPMoveFeature(session).move(test, target, new TransferStatus().setExists(true), new Delete.DisabledCallback(), ConnectionCallback.noop);
|
||||
assertFalse(session.getFeature(Find.class).find(test));
|
||||
assertTrue(session.getFeature(Find.class).find(target));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(target), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(target), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -20,7 +20,7 @@ package ch.cyberduck.core.ftp;
|
||||
|
||||
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;
|
||||
@@ -77,7 +77,7 @@ public class FTPReadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer.toByteArray());
|
||||
}
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -103,7 +103,7 @@ public class FTPReadFeatureTest extends AbstractFTPTest {
|
||||
final byte[] reference = new byte[(int) limit];
|
||||
System.arraycopy(content, (int) offset, reference, 0, (int) limit);
|
||||
assertArrayEquals(reference, download.toByteArray());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -119,7 +119,7 @@ public class FTPReadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
// Make sure subsequent PWD command works
|
||||
assertEquals(workdir, new FTPWorkdirService(session).find());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -141,7 +141,7 @@ public class FTPReadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
// Make sure subsequent PWD command works
|
||||
assertEquals(workdir, new FTPWorkdirService(session).find());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -157,6 +157,6 @@ public class FTPReadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
// Read timeout
|
||||
in.close();
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import ch.cyberduck.core.DisabledCertificateIdentityCallback;
|
||||
import ch.cyberduck.core.DisabledCertificateStore;
|
||||
import ch.cyberduck.core.DisabledHostKeyCallback;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.DisabledPasswordStore;
|
||||
import ch.cyberduck.core.Host;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.LoginConnectionService;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -70,7 +70,7 @@ public class FTPSessionTest extends AbstractFTPTest {
|
||||
));
|
||||
final FTPSession session = new FTPSession(host);
|
||||
final LoginConnectionService c = new LoginConnectionService(
|
||||
new DisabledLoginCallback(),
|
||||
LoginCallback.noop,
|
||||
new DisabledHostKeyCallback(),
|
||||
new DisabledPasswordStore(),
|
||||
ProgressListener.noop,
|
||||
@@ -103,7 +103,7 @@ public class FTPSessionTest extends AbstractFTPTest {
|
||||
final Path test = new Path(new FTPWorkdirService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
assertTrue(session.getFeature(Find.class).find(test));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
assertFalse(session.getFeature(Find.class).find(test));
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class FTPSessionTest extends AbstractFTPTest {
|
||||
throw failure;
|
||||
}
|
||||
};
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
assertEquals(Session.State.open, session.getState());
|
||||
try {
|
||||
session.close();
|
||||
@@ -160,7 +160,7 @@ public class FTPSessionTest extends AbstractFTPTest {
|
||||
}
|
||||
}));
|
||||
final LoginConnectionService c = new LoginConnectionService(
|
||||
new DisabledLoginCallback(),
|
||||
LoginCallback.noop,
|
||||
new DisabledHostKeyCallback(),
|
||||
new DisabledPasswordStore(),
|
||||
ProgressListener.noop);
|
||||
|
||||
@@ -17,7 +17,7 @@ package ch.cyberduck.core.ftp;
|
||||
* Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch
|
||||
*/
|
||||
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
@@ -41,6 +41,6 @@ public class FTPUTIMETimestampFeatureTest extends AbstractFTPTest {
|
||||
final Path test = new Path(workdir.find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
new FTPUTIMETimestampFeature(session).setTimestamp(test, modified);
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ch.cyberduck.core.ftp;
|
||||
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.Permission;
|
||||
import ch.cyberduck.core.exception.InteroperabilityException;
|
||||
@@ -30,6 +30,6 @@ public class FTPUnixPermissionFeatureTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), test, new TransferStatus());
|
||||
new FTPUnixPermissionFeature(session).setUnixPermission(test, new Permission(666));
|
||||
assertEquals("666", new FTPListService(session).list(home, new DisabledListProgressListener()).get(test).attributes().getPermission().getMode());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package ch.cyberduck.core.ftp;
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -35,6 +35,6 @@ public class FTPUploadFeatureTest extends AbstractFTPTest {
|
||||
final Path f = new Path(new FTPWorkdirService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), f, new TransferStatus());
|
||||
assertTrue(new FTPUploadFeature(session).append(f, new TransferStatus().setExists(true).setLength(0L).setRemote(new FTPAttributesFinderFeature(session).find(f))).append);
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(f), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(f), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package ch.cyberduck.core.ftp;
|
||||
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.exception.AccessDeniedException;
|
||||
@@ -65,7 +65,7 @@ public class FTPWriteFeatureTest extends AbstractFTPTest {
|
||||
System.arraycopy(content, 1, reference, 0, content.length - 1);
|
||||
assertArrayEquals(reference, buffer);
|
||||
}
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -96,7 +96,7 @@ public class FTPWriteFeatureTest extends AbstractFTPTest {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream(content.length);
|
||||
IOUtils.copy(new FTPReadFeature(session).read(test, new TransferStatus().setLength(content.length), ConnectionCallback.noop), out);
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -133,7 +133,7 @@ public class FTPWriteFeatureTest extends AbstractFTPTest {
|
||||
assertArrayEquals(content, out.toByteArray());
|
||||
assertTrue(new DefaultFindFeature(session).find(test));
|
||||
assertEquals(content.length, new DefaultAttributesFinderFeature(session).find(test).getSize());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Ignore
|
||||
|
||||
@@ -17,8 +17,8 @@ package ch.cyberduck.core.ftp.list;
|
||||
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListService;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.ftp.AbstractFTPTest;
|
||||
@@ -50,7 +50,7 @@ public class FTPDefaultListServiceTest extends AbstractFTPTest {
|
||||
final Path file = new Path(directory, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(list.list(directory, new DisabledListProgressListener()).contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -61,6 +61,6 @@ public class FTPDefaultListServiceTest extends AbstractFTPTest {
|
||||
final Path file = new Path(directory, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), file, new TransferStatus());
|
||||
assertTrue(list.list(directory, new DisabledListProgressListener()).contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ package ch.cyberduck.core.ftp.list;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListProgressListener;
|
||||
import ch.cyberduck.core.ListService;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.exception.BackgroundException;
|
||||
import ch.cyberduck.core.exception.ConnectionTimeoutException;
|
||||
@@ -62,7 +62,7 @@ public class FTPListServiceTest extends AbstractFTPTest {
|
||||
}
|
||||
});
|
||||
assertTrue(list.contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -81,7 +81,7 @@ public class FTPListServiceTest extends AbstractFTPTest {
|
||||
}
|
||||
});
|
||||
assertTrue(list.contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,7 +102,7 @@ public class FTPListServiceTest extends AbstractFTPTest {
|
||||
}
|
||||
}).isEmpty());
|
||||
assertTrue(callback.get());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(directory), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test(expected = ConnectionTimeoutException.class)
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.ftp.list;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListService;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.ftp.AbstractFTPTest;
|
||||
@@ -49,7 +49,7 @@ public class FTPMlsdListServiceTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), file, new TransferStatus());
|
||||
final AttributedList<Path> list = service.list(directory, new DisabledListProgressListener());
|
||||
assertTrue(list.contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.ftp.list;
|
||||
import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.AttributedList;
|
||||
import ch.cyberduck.core.DisabledListProgressListener;
|
||||
import ch.cyberduck.core.DisabledLoginCallback;
|
||||
import ch.cyberduck.core.ListService;
|
||||
import ch.cyberduck.core.LoginCallback;
|
||||
import ch.cyberduck.core.Path;
|
||||
import ch.cyberduck.core.features.Delete;
|
||||
import ch.cyberduck.core.ftp.AbstractFTPTest;
|
||||
@@ -57,7 +57,7 @@ public class FTPStatListServiceTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), file, new TransferStatus());
|
||||
final AttributedList<Path> list = service.list(directory, new DisabledListProgressListener());
|
||||
assertTrue(list.contains(file));
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(file), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.shared;
|
||||
*/
|
||||
|
||||
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.features.Delete;
|
||||
import ch.cyberduck.core.ftp.AbstractFTPTest;
|
||||
@@ -84,6 +84,6 @@ public class DefaultDownloadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
final Delete delete = session.getFeature(Delete.class);
|
||||
delete.delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
delete.delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ package ch.cyberduck.core.shared;
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -77,7 +77,7 @@ public class DefaultUploadFeatureTest extends AbstractFTPTest {
|
||||
in.close();
|
||||
assertArrayEquals(content, buffer);
|
||||
final Delete delete = session.getFeature(Delete.class);
|
||||
delete.delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
delete.delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
local.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ import ch.cyberduck.core.AlphanumericRandomStringService;
|
||||
import ch.cyberduck.core.ConnectionCallback;
|
||||
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.Path;
|
||||
import ch.cyberduck.core.PathCache;
|
||||
import ch.cyberduck.core.ProgressListener;
|
||||
@@ -57,13 +57,13 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
new FTPTouchFeature(session).touch(new FTPWriteFeature(session), source, new TransferStatus());
|
||||
assertTrue(new DefaultFindFeature(session).find(source));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(source, target), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(new DefaultFindFeature(session).find(source));
|
||||
assertTrue(new DefaultFindFeature(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
|
||||
@@ -78,13 +78,13 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
assertTrue(new DefaultFindFeature(session).find(targetFolder));
|
||||
// copy file into vault
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(sourceFile, targetFile), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(new DefaultFindFeature(session).find(sourceFile));
|
||||
assertTrue(new DefaultFindFeature(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
|
||||
@@ -100,14 +100,14 @@ public class CopyWorkerTest extends AbstractFTPTest {
|
||||
final Path targetFolder = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
|
||||
final Path targetFile = new Path(targetFolder, sourceFile.getName(), EnumSet.of(Path.Type.file));
|
||||
final FTPSession copySession = new FTPSession(new Host(session.getHost()).setCredentials(new Credentials("test", "test")));
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.login(new DisabledLoginCallback(), CancelCallback.noop);
|
||||
copySession.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), LoginCallback.noop, CancelCallback.noop);
|
||||
copySession.login(LoginCallback.noop, CancelCallback.noop);
|
||||
final CopyWorker worker = new CopyWorker(Collections.singletonMap(folder, targetFolder), new SessionPool.SingleSessionPool(copySession), PathCache.empty(), ProgressListener.noop, ConnectionCallback.noop);
|
||||
worker.run(session);
|
||||
assertTrue(new DefaultFindFeature(session).find(targetFolder));
|
||||
assertTrue(new DefaultFindFeature(session).find(targetFile));
|
||||
assertTrue(new DefaultFindFeature(session).find(folder));
|
||||
assertTrue(new DefaultFindFeature(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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class FTPConcurrentTransferWorkerTest extends AbstractFTPTest {
|
||||
};
|
||||
final Transfer t = new UploadTransfer(host, test, local);
|
||||
final BytecountStreamListener counter = new BytecountStreamListener();
|
||||
final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop);
|
||||
final LoginConnectionService connect = new LoginConnectionService(LoginCallback.noop, new DisabledHostKeyCallback(), new DisabledPasswordStore(), ProgressListener.noop);
|
||||
final DefaultSessionPool pool = new DefaultSessionPool(connect,
|
||||
new DefaultVaultRegistry(new DisabledPasswordCallback()), new DisabledTranscriptListener(), host,
|
||||
new GenericObjectPool<>(new PooledSessionFactory(connect, new DisabledX509TrustManager(), new DefaultX509KeyManager(),
|
||||
@@ -159,7 +159,7 @@ public class FTPConcurrentTransferWorkerTest extends AbstractFTPTest {
|
||||
assertEquals(content.length, counter.getRecv(), 0L);
|
||||
assertEquals(content.length, counter.getSent(), 0L);
|
||||
assertTrue(failed.get());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
|
||||
new FTPDeleteFeature(session).delete(Collections.singletonList(test), LoginCallback.noop, new Delete.DisabledCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -182,7 +182,7 @@ public class FTPConcurrentTransferWorkerTest extends AbstractFTPTest {
|
||||
};
|
||||
final Transfer transfer = new UploadTransfer(host, list);
|
||||
final DefaultSessionPool pool = new DefaultSessionPool(
|
||||
new LoginConnectionService(new DisabledLoginCallback(), new DisabledHostKeyCallback(), new DisabledPasswordStore(),
|
||||
new LoginConnectionService(LoginCallback.noop, new DisabledHostKeyCallback(), new DisabledPasswordStore(),
|
||||
ProgressListener.noop),
|
||||
new DisabledX509TrustManager(), new DefaultX509KeyManager(),
|
||||
new DefaultVaultRegistry(new DisabledPasswordCallback()), new DisabledTranscriptListener(), host);
|
||||
@@ -194,7 +194,7 @@ public class FTPConcurrentTransferWorkerTest extends AbstractFTPTest {
|
||||
return TransferAction.overwrite;
|
||||
}
|
||||
}, new DisabledTransferErrorCallback(),
|
||||
new DisabledLoginCallback(), ProgressListener.noop, StreamListener.noop, new DisabledNotificationService()
|
||||
LoginCallback.noop, ProgressListener.noop, StreamListener.noop, new DisabledNotificationService()
|
||||
);
|
||||
pool.withMaxTotal(connections);
|
||||
final Session<?> session = worker.borrow(ConcurrentTransferWorker.Connection.source);
|
||||
|
||||
Reference in New Issue
Block a user