@Test public void testUploadEmptyQueue() { final JschSftpProcessor processor = mock(StubbedJschSftpProcessor.class); final Collection<FileRequest> requests = Collections.<FileRequest> emptyList(); new JschUploader(processor).upload(requests); verify(processor, never()).upload(); }
@Override public void upload(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": upload(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueUpload(request, ignoreChmodErrors, permissions); } processor.upload(); } finally { point.collect(); } }
JschUploader implements Uploader { @Override public void upload(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": upload(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueUpload(request, ignoreChmodErrors, permissions); } processor.upload(); } finally { point.collect(); } } }
JschUploader implements Uploader { @Override public void upload(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": upload(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueUpload(request, ignoreChmodErrors, permissions); } processor.upload(); } finally { point.collect(); } } JschUploader(final JschSftpProcessor processor); }
JschUploader implements Uploader { @Override public void upload(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": upload(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueUpload(request, ignoreChmodErrors, permissions); } processor.upload(); } finally { point.collect(); } } JschUploader(final JschSftpProcessor processor); @Override void ignoreChmodErrors(final boolean ignoreChmodErrors); @Override void setPermissions(final int permissions); @Override void upload(final Collection<? extends FileRequest> requests); }
JschUploader implements Uploader { @Override public void upload(final Collection<? extends FileRequest> requests) { final EtmPoint point = MONITOR.createPoint(getClass().getName() + ": upload(Collection)"); try { if (requests.isEmpty()) { return; } for (final FileRequest request : requests) { processor.queueUpload(request, ignoreChmodErrors, permissions); } processor.upload(); } finally { point.collect(); } } JschUploader(final JschSftpProcessor processor); @Override void ignoreChmodErrors(final boolean ignoreChmodErrors); @Override void setPermissions(final int permissions); @Override void upload(final Collection<? extends FileRequest> requests);  }