use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserUnix.
@Test
public void createFileEntryParserUnix() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla unix bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(UnixFTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserNetware.
@Test
public void createFileEntryParserNetware() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla NeTwArE bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(NetwareFTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserPlainOs400.
@Test
public void createFileEntryParserPlainOs400() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("OS/400");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(OS400FTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserPlainWindows.
@Test
public void createFileEntryParserPlainWindows() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("WINDOWS");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(NTFTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserNotPlainOs400.
@Test
public void createFileEntryParserNotPlainOs400() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("OS/400 bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(CompositeFileEntryParser.class));
}
Aggregations