Search in sources :

Example 11 with FTPFileEntryParser

use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.

the class OsgiParserFactoryTest method createFileEntryParserWin32.

@Test
public void createFileEntryParserWin32() throws Exception {
    when(ftpClientConfig.getServerSystemKey()).thenReturn("bla WIN32 bla");
    FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
    assertThat(result, instanceOf(CompositeFileEntryParser.class));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) CompositeFileEntryParser(org.apache.commons.net.ftp.parser.CompositeFileEntryParser) Test(org.junit.Test)

Example 12 with FTPFileEntryParser

use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.

the class OsgiParserFactoryTest method createFileEntryParserTypeL8.

@Test
public void createFileEntryParserTypeL8() throws Exception {
    when(ftpClientConfig.getServerSystemKey()).thenReturn("bla type: l8 bla");
    FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
    assertThat(result, instanceOf(UnixFTPEntryParser.class));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) UnixFTPEntryParser(org.apache.commons.net.ftp.parser.UnixFTPEntryParser) Test(org.junit.Test)

Example 13 with FTPFileEntryParser

use of org.apache.commons.net.ftp.FTPFileEntryParser in project camel by apache.

the class OsgiParserFactoryTest method createFileEntryParserMacOsPeter.

@Test
public void createFileEntryParserMacOsPeter() throws Exception {
    when(ftpClientConfig.getServerSystemKey()).thenReturn("bla MaCoS PeTER bla");
    FTPFileEntryParser result = OSGI_PARSER_FACTORY.createFileEntryParser(ftpClientConfig);
    assertThat(result, instanceOf(MacOsPeterFTPEntryParser.class));
}
Also used : MacOsPeterFTPEntryParser(org.apache.commons.net.ftp.parser.MacOsPeterFTPEntryParser) FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) Test(org.junit.Test)

Aggregations

FTPFileEntryParser (org.apache.commons.net.ftp.FTPFileEntryParser)13 Test (org.junit.Test)13 CompositeFileEntryParser (org.apache.commons.net.ftp.parser.CompositeFileEntryParser)3 UnixFTPEntryParser (org.apache.commons.net.ftp.parser.UnixFTPEntryParser)3 MVSFTPEntryParser (org.apache.commons.net.ftp.parser.MVSFTPEntryParser)1 MacOsPeterFTPEntryParser (org.apache.commons.net.ftp.parser.MacOsPeterFTPEntryParser)1 NTFTPEntryParser (org.apache.commons.net.ftp.parser.NTFTPEntryParser)1 NetwareFTPEntryParser (org.apache.commons.net.ftp.parser.NetwareFTPEntryParser)1 OS2FTPEntryParser (org.apache.commons.net.ftp.parser.OS2FTPEntryParser)1 OS400FTPEntryParser (org.apache.commons.net.ftp.parser.OS400FTPEntryParser)1 VMSVersioningFTPEntryParser (org.apache.commons.net.ftp.parser.VMSVersioningFTPEntryParser)1