/** * Tests sane default for local directory if directory no longer exists. * * @throws Exception */ @Test public void test08RestoreCanRevertToDefaultLocalIfLocalDirIsRemoved() throws Exception { assertTrue(testDir.delete()); session.disconnect(); session.restore(); assertTrue(session.getLocalDirectory().equals(System.getProperty("user.dir"))); }
/** * Tests restoring session after disconnect. * * @throws Exception */ @Test public void test07CanRestoreSessionAfterDisconnect() throws Exception { session.disconnect(); session.restore(); assertTrue(session.isConnected()); assertTrue(session.printWorkingDirectory().contains("for_testing")); }