@Test public void testFind() throws Exception { final LocalSession session = new LocalSession(new Host(new LocalProtocol(), new LocalProtocol().getDefaultHostname())); session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback()); session.login(Proxy.DIRECT, new DisabledLoginCallback(), new DisabledCancelCallback()); assertTrue(new LocalHomeFinderFeature(session).find().getAbsolute().endsWith( System.getProperty("user.home").replaceAll("\\\\", "/"))); session.close(); }
@Override public Path find() throws BackgroundException { final Path directory = super.find(); if(directory == DEFAULT_HOME) { final String home = LocalFactory.get().getAbsolute(); return this.toPath(home); } return directory; }
LocalHomeFinderFeature extends DefaultHomeFinderService { @Override public Path find() throws BackgroundException { final Path directory = super.find(); if(directory == DEFAULT_HOME) { final String home = LocalFactory.get().getAbsolute(); return this.toPath(home); } return directory; } }
LocalHomeFinderFeature extends DefaultHomeFinderService { @Override public Path find() throws BackgroundException { final Path directory = super.find(); if(directory == DEFAULT_HOME) { final String home = LocalFactory.get().getAbsolute(); return this.toPath(home); } return directory; } LocalHomeFinderFeature(final LocalSession session); }
LocalHomeFinderFeature extends DefaultHomeFinderService { @Override public Path find() throws BackgroundException { final Path directory = super.find(); if(directory == DEFAULT_HOME) { final String home = LocalFactory.get().getAbsolute(); return this.toPath(home); } return directory; } LocalHomeFinderFeature(final LocalSession session); @Override Path find(); }
LocalHomeFinderFeature extends DefaultHomeFinderService { @Override public Path find() throws BackgroundException { final Path directory = super.find(); if(directory == DEFAULT_HOME) { final String home = LocalFactory.get().getAbsolute(); return this.toPath(home); } return directory; } LocalHomeFinderFeature(final LocalSession session); @Override Path find();  }