Search in sources :

Example 1 with FTPFileEntryParser

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));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) UnixFTPEntryParser(org.apache.commons.net.ftp.parser.UnixFTPEntryParser) Test(org.junit.Test)

Example 2 with FTPFileEntryParser

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));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) NetwareFTPEntryParser(org.apache.commons.net.ftp.parser.NetwareFTPEntryParser) Test(org.junit.Test)

Example 3 with FTPFileEntryParser

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));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) OS400FTPEntryParser(org.apache.commons.net.ftp.parser.OS400FTPEntryParser) Test(org.junit.Test)

Example 4 with FTPFileEntryParser

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));
}
Also used : NTFTPEntryParser(org.apache.commons.net.ftp.parser.NTFTPEntryParser) FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) Test(org.junit.Test)

Example 5 with FTPFileEntryParser

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));
}
Also used : FTPFileEntryParser(org.apache.commons.net.ftp.FTPFileEntryParser) CompositeFileEntryParser(org.apache.commons.net.ftp.parser.CompositeFileEntryParser) 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