Package org.syncany.database

Examples of org.syncany.database.SqlDatabase


    // Test 1: Check result sets for inconsistencies
    assertTrue("Status command expected to return changes.", statusResult.getChangeSet().hasChanges());
    assertFalse("File should NOT be uploaded while still writing (no half-file upload).", upResult.getChangeSet().hasChanges());

    // Test 2: Check database for inconsistencies
    SqlDatabase database = clientA.loadLocalDatabase();

    assertNull("File should NOT be uploaded while still writing (no half-file upload).", database.getFileVersionByPath("large-test-file"));
    assertNull("There should NOT be a new database version, because file should not have been added.", database.getLastDatabaseVersionHeader());

    // Test 3: Check file system for inconsistencies
    File repoPath = new File(((LocalTransferSettings) testConnection).getPath() + "/databases");
    String[] repoFileList = repoPath.list(new FilenameFilter() {
      @Override
View Full Code Here


    // Test 1: Check result sets for inconsistencies
    assertTrue("Status command expected to return changes.", statusResult.getChangeSet().hasChanges());
    assertTrue("File should be uploaded while it is read-only.", upResult.getChangeSet().hasChanges());

    // Test 2: Check database for inconsistencies
    SqlDatabase database = client.loadLocalDatabase();
    assertNotNull("There should be a new database version, because files should have been added.", database.getLastDatabaseVersionHeader());

    // Test 3: Check file system for inconsistencies
    File repoPath = ((LocalTransferSettings) connection).getPath();
    assertEquals("Repository should contain any files.", 5, repoPath.list().length);
  }
View Full Code Here

    // Test 1: Check result sets for inconsistencies
    assertFalse("Status command expected to return NO changes.", statusResult.getChangeSet().hasChanges());
    assertFalse("File should NOT be uploaded while it is locked.", upResult.getChangeSet().hasChanges());

    // Test 2: Check database for inconsistencies
    SqlDatabase database = client.loadLocalDatabase();

    assertNull("File should NOT be uploaded while it is locked.", database.getFileVersionByPath("large-test-file"));
    assertNull("There should NOT be a new database version, because file should not have been added.", database.getLastDatabaseVersionHeader());

    // Test 3: Check file system for inconsistencies
    File repoPath = ((LocalTransferSettings) connection).getPath();
    String[] repoFileList = repoPath.list(new FilenameFilter() {
      @Override
View Full Code Here

TOP

Related Classes of org.syncany.database.SqlDatabase

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.