Remove System.out/.err Calls From All Tests

This commit is contained in:
Gary Russell
2016-04-14 16:22:45 -04:00
parent e5bf0187eb
commit 4027b38da8
32 changed files with 164 additions and 89 deletions

View File

@@ -16,20 +16,26 @@
package org.springframework.integration.sftp;
import java.io.File;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.stereotype.Component;
import java.io.File;
/**
* @author Josh Long
* @author Gary Russell
*/
@Component("sftpAnnouncer")
public class SftpFileAnnouncer {
private final Log logger = LogFactory.getLog(getClass());
@ServiceActivator
public void announceFile(File file) {
System.out.println("New file from the remote host has arrived: " + file.getAbsolutePath());
logger.info("New file from the remote host has arrived: " + file.getAbsolutePath());
}
}

View File

@@ -22,9 +22,9 @@ import org.junit.Ignore;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.integration.support.MessageBuilder;
/**
* @author Oleg Zhurakousky
@@ -45,9 +45,7 @@ public class SftpOutboundTransferSample {
inputChannel.send(message);
Thread.sleep(2000);
}
System.out.println("Done");
ac.stop();
ac.close();
}
}