Package org.syncany.tests.util

Examples of org.syncany.tests.util.TestSqlDatabase$TestSqlDao


    clientA.upWithForceChecksum();
   
    clientA.deleteFile("new folder/some subfolder"); // Delete this!
   
    // - Create new version (delete folder)
    TestSqlDatabase sqlDatabaseA = new TestSqlDatabase(testConfigA);
    PartialFileHistory folderFileHistoryWithLastVersion = sqlDatabaseA.getFileHistoryWithLastVersion("new folder/some subfolder");

    FileVersion deletedFolderVersion = folderFileHistoryWithLastVersion.getLastVersion().clone();
    deletedFolderVersion.setStatus(FileStatus.DELETED);
    deletedFolderVersion.setVersion(deletedFolderVersion.getVersion()+1);
   
    PartialFileHistory deletedFolderVersionHistory = new PartialFileHistory(folderFileHistoryWithLastVersion.getFileHistoryId());
    deletedFolderVersionHistory.addFileVersion(deletedFolderVersion);
   
    DatabaseVersion winnersDatabaseVersion = TestDatabaseUtil.createDatabaseVersion(sqlDatabaseA.getLastDatabaseVersionHeader());   
    winnersDatabaseVersion.addFileHistory(deletedFolderVersionHistory);
   
    // - Create memory database with this version
    MemoryDatabase winnersDatabase = new MemoryDatabase();
    winnersDatabase.addDatabaseVersion(winnersDatabaseVersion);
View Full Code Here


   
    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");
    PartialFileHistory file1WithDiffLastModDate = clientDatabaseB.getFileHistoryWithFileVersions("A-file1-with-different-modified-date-moved.jpg");
   
    assertNotNull(file1Orig);
    assertNotNull(file1WithDiffLastModDate);
   
    FileVersion fileVersion1OrigV1 = file1Orig.getFileVersion(1);
View Full Code Here

TOP

Related Classes of org.syncany.tests.util.TestSqlDatabase$TestSqlDao

Copyright © 2018 www.massapicom. 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.