use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserMvs.
@Test
public void createFileEntryParserMvs() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla MvS bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(MVSFTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserLinux.
@Test
public void createFileEntryParserLinux() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla linux 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 createFileEntryParserVms.
@Test
public void createFileEntryParserVms() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla vms bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(VMSVersioningFTPEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserNotPlainWindows.
@Test
public void createFileEntryParserNotPlainWindows() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("WINDOWS XP");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(CompositeFileEntryParser.class));
}
use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.
the class OsgiParserFactoryTest method createFileEntryParserOs2.
@Test
public void createFileEntryParserOs2() throws Exception {
when(ftpClientConfig.getServerSystemKey()).thenReturn("bla OS/2 bla");
FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
assertThat(result, instanceOf(OS2FTPEntryParser.class));
}
Aggregations