use of ch.cyberduck.core.synchronization.ComparePathFilter in project cyberduck by iterate-ch.
the class SynchronizationPathFilterTest method testAcceptDirectory.
@Test
public void testAcceptDirectory() throws Exception {
Session session = new NullSession(new Host(new TestProtocol()));
final SynchronizationPathFilter mirror = new SynchronizationPathFilter(new ComparePathFilter() {
@Override
public Comparison compare(Path file, Local local, final ProgressListener listener) {
return Comparison.equal;
}
}, new OverwriteFilter(new DownloadSymlinkResolver(Collections.<TransferItem>emptyList()), session), new ch.cyberduck.core.transfer.upload.OverwriteFilter(new UploadSymlinkResolver(null, Collections.<TransferItem>emptyList()), session), TransferAction.mirror);
assertTrue(mirror.accept(new Path("/p", EnumSet.of(Path.Type.directory)), null, new TransferStatus().exists(true)));
}
Aggregations