Cyberduck Mountain Duck CLI

Changeset 41299


Ignore:
Timestamp:
Jun 7, 2017 9:00:18 PM (14 months ago)
Author:
dkocher
Message:

Fix tests.

Location:
shelves/02.06.2017
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • shelves/02.06.2017/cli/src/test/java/ch/cyberduck/cli/CommandLinePathParserTest.java

    r41257 r41299  
    5151        final CommandLine input = parser.parse(new Options(), new String[]{});
    5252
    53         final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Arrays.asList(new FTPTLSProtocol(), new S3Protocol())));
     53        final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Arrays.asList(new FTPTLSProtocol() {
     54            @Override
     55            public boolean isEnabled() {
     56                return true;
     57            }
     58        }, new S3Protocol() {
     59            @Override
     60            public boolean isEnabled() {
     61                return true;
     62            }
     63        })
     64        ));
    5465        assertEquals(new Path("/", EnumSet.of(Path.Type.directory)),
    5566                new CommandLinePathParser(input, factory).parse("ftps://u@test.cyberduck.ch/"));
     
    7384    @Test
    7485    public void testParseProfile() throws Exception {
    75         final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singletonList(new SwiftProtocol())));
     86        final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new SwiftProtocol() {
     87            @Override
     88            public boolean isEnabled() {
     89                return true;
     90            }
     91        })));
    7692        final ProfilePlistReader reader = new ProfilePlistReader(factory, new DeserializerFactory(PlistDeserializer.class.getName()));
    7793        final Profile profile = reader.read(
  • shelves/02.06.2017/cli/src/test/java/ch/cyberduck/cli/CommandLineUriParserTest.java

    r41296 r41299  
    4949        final CommandLine input = parser.parse(new Options(), new String[]{});
    5050
    51         final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Arrays.asList(new FTPTLSProtocol(), new S3Protocol())));
     51        final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Arrays.asList(new FTPTLSProtocol() {
     52            @Override
     53            public boolean isEnabled() {
     54                return true;
     55            }
     56        }, new S3Protocol() {
     57            @Override
     58            public boolean isEnabled() {
     59                return true;
     60            }
     61        })));
    5262        assertTrue(new Host(new S3Protocol(), "s3.amazonaws.com", 443, "/cyberduck-test/key", new Credentials("AWS456", null))
    5363                .compareTo(new CommandLineUriParser(input, factory).parse("s3://AWS456@cyberduck-test/key")) == 0);
     
    6272        final Set<Protocol> list = new HashSet<>(Arrays.asList(
    6373                new SwiftProtocol(),
    64                 new ProfilePlistReader(new ProtocolFactory(Collections.singleton(new SwiftProtocol())))
     74                new ProfilePlistReader(new ProtocolFactory(Collections.singleton(new SwiftProtocol() {
     75                    @Override
     76                    public boolean isEnabled() {
     77                        return true;
     78                    }
     79                })))
    6580                        .read(new Local("../profiles/default/Rackspace US.cyberduckprofile"))
    6681        ));
  • shelves/02.06.2017/cli/src/test/java/ch/cyberduck/cli/TerminalOptionsInputValidatorTest.java

    r41257 r41299  
    4040    @Test
    4141    public void testValidate() throws Exception {
    42         assertTrue(new TerminalOptionsInputValidator(new ProtocolFactory(Collections.singleton(new FTPProtocol())))
     42        assertTrue(new TerminalOptionsInputValidator(new ProtocolFactory(Collections.singleton(new FTPProtocol() {
     43            @Override
     44            public boolean isEnabled() {
     45                return true;
     46            }
     47        })))
    4348                .validate("ftp://cdn.duck.sh/"));
    44         assertFalse(new TerminalOptionsInputValidator(new ProtocolFactory(Collections.singleton(new FTPProtocol())))
     49        assertFalse(new TerminalOptionsInputValidator(new ProtocolFactory(Collections.singleton(new FTPProtocol() {
     50            @Override
     51            public boolean isEnabled() {
     52                return true;
     53            }
     54        })))
    4555                .validate("ftp://cdn.duck.sh/%%~nc"));
    4656    }
  • shelves/02.06.2017/ftp/src/main/java/ch/cyberduck/core/ftp/FTPTLSProtocol.java

    r41265 r41299  
    2525import org.apache.commons.lang3.StringUtils;
    2626
    27 public final class FTPTLSProtocol extends AbstractProtocol {
     27public class FTPTLSProtocol extends AbstractProtocol {
    2828    @Override
    2929    public String getIdentifier() {
Note: See TracChangeset for help on using the changeset viewer.
swiss made software