use of com.adaptris.core.MimeEncoder in project interlok by adaptris.
the class RelaxedFtpProducerTest method testProduce_WithEncoder.
@Test
public void testProduce_WithEncoder() throws Exception {
EmbeddedFtpServer helper = new EmbeddedFtpServer();
FileSystem filesystem = helper.createFilesystem_DirsOnly();
FakeFtpServer server = helper.createAndStart(filesystem);
try {
RelaxedFtpProducer ftpProducer = createForTests(DESTINATION_URL + SLASH + DEFAULT_WORK_DIR_NAME);
ftpProducer.setEncoder(new MimeEncoder());
FtpConnection produceConnection = create(server);
StandaloneProducer sp = new StandaloneProducer(produceConnection, ftpProducer);
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(PAYLOAD);
ExampleServiceCase.execute(sp, msg);
assertEquals(1, filesystem.listFiles(DEFAULT_WORK_DIR_CANONICAL).size());
} finally {
server.stop();
}
}
Aggregations