Package org.syncany.config

Examples of org.syncany.config.Config


public class DatabaseVersionDaoTest {
  @Test
  public void testGetDatabaseVersionsMasterAndDirty() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here


  }
 
  @Test
  public void testGetDatabaseVersionsTo() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

  }
 
  @Test
  public void testGetLastDatabaseVersionHeader1() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set3.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

  }
 
  @Test
  public void testPersistDatabaseVersion() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

  }
 
  @Test
  public void testGetLocalDatabaseBranch1() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set3.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

  }
 
  @Test
  public void testGetLocalDatabaseBranch2() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

  }
 
  @Test
  public void testGetMaxDirtyVectorClock() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

public class ConfigHelperTest {
  @Test
  public void testConfigHelperFindLocalDirInPath() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    File startingPath = testConfig.getLocalDir();
   
    // Run
    File actualLocalDir = ConfigHelper.findLocalDirInPath(startingPath);
   
    // Test
    assertNotNull(actualLocalDir);
    assertEquals(testConfig.getLocalDir(), actualLocalDir.getCanonicalFile());
   
    // Tear down
    TestConfigUtil.deleteTestLocalConfigAndData(testConfig);
  }
View Full Code Here

  }
 
  @Test
  public void testMarkDatabaseVersionDirty() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set2.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

 
 
  @Test
  public void testRemoveDirtyDatabaseVersions() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
    Connection databaseConnection = testConfig.createDatabaseConnection();

    // Run
    TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set1.sql");
   
    ChunkSqlDao chunkDao = new ChunkSqlDao(databaseConnection);
View Full Code Here

TOP

Related Classes of org.syncany.config.Config

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.