コード例 #1
0
 /**
  * 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")));
 }
コード例 #2
0
 /**
  * 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"));
 }