@Test public void testPort() { OpenSSHHostnameConfigurator c = new OpenSSHHostnameConfigurator( new OpenSshConfig( new Local("src/test/resources", "openssh/config"))); assertEquals(555, c.getPort("portalias")); assertEquals(-1, c.getPort(null)); }
@Override public int getPort(final String alias) { if(StringUtils.isBlank(alias)) { return -1; } return configuration.lookup(alias).getPort(); }
OpenSSHHostnameConfigurator implements HostnameConfigurator { @Override public int getPort(final String alias) { if(StringUtils.isBlank(alias)) { return -1; } return configuration.lookup(alias).getPort(); } }
OpenSSHHostnameConfigurator implements HostnameConfigurator { @Override public int getPort(final String alias) { if(StringUtils.isBlank(alias)) { return -1; } return configuration.lookup(alias).getPort(); } OpenSSHHostnameConfigurator();  OpenSSHHostnameConfigurator(final OpenSshConfig configuration); }
OpenSSHHostnameConfigurator implements HostnameConfigurator { @Override public int getPort(final String alias) { if(StringUtils.isBlank(alias)) { return -1; } return configuration.lookup(alias).getPort(); } OpenSSHHostnameConfigurator();  OpenSSHHostnameConfigurator(final OpenSshConfig configuration); @Override String getHostname(final String alias); @Override int getPort(final String alias); @Override void reload(); @Override String toString(); }
OpenSSHHostnameConfigurator implements HostnameConfigurator { @Override public int getPort(final String alias) { if(StringUtils.isBlank(alias)) { return -1; } return configuration.lookup(alias).getPort(); } OpenSSHHostnameConfigurator();  OpenSSHHostnameConfigurator(final OpenSshConfig configuration); @Override String getHostname(final String alias); @Override int getPort(final String alias); @Override void reload(); @Override String toString();  }