Package org.syncany.tests.util

Examples of org.syncany.tests.util.TestClient.moveFile()


    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.createNewFile("B-file2", 0);
    clientB.moveFile("A-file1.jpg", "B-file1-moved");
    clientB.up();
   
    SqlDatabase database = clientB.loadLocalDatabase();
    DatabaseVersionHeader lastDatabaseVersionHeaderBeforeUp = database.getLastDatabaseVersionHeader();
   
View Full Code Here


    // Create files and upload
    clientA.createNewFolder("folder");   
    clientA.up();
   
    clientB.down();
    clientB.moveFile("folder", "moved");
    clientB.up();
   
    clientA.down();
    assertFileEquals(clientA.getLocalFile("moved"), clientB.getLocalFile("moved"))
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
View Full Code Here

    clientA.createNewFolder("folder");   
    clientA.createNewFile("folder/file");
    clientA.up();
   
    clientB.down();
    clientB.moveFile("folder", "moved");
    clientB.up();
     
    clientA.down();
    assertFalse("Deleted folder should not exist.", clientA.getLocalFile("folder").exists());
    assertFalse("Deleted file should not exist.", clientA.getLocalFile("folder/file").exists());
View Full Code Here

    clientA.createNewFolder("folder/folder2");
    clientA.createNewFile("folder/folder2/file2");
    clientA.up();
   
    clientB.down();
    clientB.moveFile("folder", "moved");
    clientB.up();
     
    clientA.down();
    assertFalse("Deleted folder should not exist.", clientA.getLocalFile("folder").exists());
    assertFalse("Deleted file should not exist.", clientA.getLocalFile("folder/file").exists());
View Full Code Here

    // B down/move/up
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-original", "B-moved");
    clientB.up();
   
    // A down/move/up
    clientA.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
View Full Code Here

    // B down/move/up
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-moved-again", "B-moved"); // same filename as above!
    clientB.up();
   
    // A down/move/up
    clientA.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
View Full Code Here

    // B, down, then move BOTH files
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-file1.jpg", "A-file1-moved.jpg");
    clientB.moveFile("A-file1-with-different-modified-date.jpg", "A-file1-with-different-modified-date-moved.jpg");       
    clientB.up();
   
    TestSqlDatabase clientDatabaseB = clientB.loadLocalDatabase();
   
View Full Code Here

    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-file1.jpg", "A-file1-moved.jpg");
    clientB.moveFile("A-file1-with-different-modified-date.jpg", "A-file1-with-different-modified-date-moved.jpg");       
    clientB.up();
   
    TestSqlDatabase clientDatabaseB = clientB.loadLocalDatabase();
   
    PartialFileHistory file1Orig = clientDatabaseB.getFileHistoryWithFileVersions("A-file1-moved.jpg");
View Full Code Here

    // A moves, and up
    clientA.deleteFile("A-original");
    clientA.up();
   
    // B deletes, then down; this should not fail or throw exceptions
    clientB.moveFile("A-original", "B-moved");
    clientB.down();
    assertFalse("File A-orginal should not be recreated.", clientB.getLocalFile("A-original").exists());

    // Sync them
    clientB.sync();   
View Full Code Here

    clientA.up();
   
    clientB.down();
    assertFileEquals(clientA.getLocalFile("file"), clientB.getLocalFile("file"));
   
    clientB.moveFile("file", "moved");
    clientB.up();
   
    clientA.down();
    assertFalse("Originally moved file should not exist.", clientA.getLocalFile("file").exists());
    assertFileEquals(clientA.getLocalFile("moved"), clientB.getLocalFile("moved"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.