Search in sources :

Example 6 with FTPFileEntryParser

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

Example 7 with FTPFileEntryParser

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

Example 8 with FTPFileEntryParser

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

Example 9 with FTPFileEntryParser

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

Example 10 with FTPFileEntryParser

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