Package org.syncany.plugins.transfer

Examples of org.syncany.plugins.transfer.TransferSettings


  @Test(expected = StorageException.class)
  public void testConnectWithInvalidSettings() throws StorageException {
    TransferPlugin plugin = Plugins.get(getPluginId(), TransferPlugin.class);

    TransferSettings connection = plugin.createEmptySettings();

    // This should cause a Storage exception, because the path does not exist
    TransferManager transferManager = plugin.createTransferManager(connection, null);

    transferManager.connect();
View Full Code Here


  }

  private TransferManager loadPluginAndCreateTransferManager() throws StorageException {
    TransferPlugin pluginInfo = Plugins.get(getPluginId(), TransferPlugin.class);

    TransferSettings connection = pluginInfo.createEmptySettings();
    for (Map.Entry<String, String> pair : createPluginSettings().entrySet()) {
      connection.setField(pair.getKey(), pair.getValue());
    }

    return new TransactionAwareTransferManager(pluginInfo.createTransferManager(connection, null), null);
  }
View Full Code Here

public class MixedUpDownScenarioTest {
  @Test
  @Ignore
  public void testMixedScenario1() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
   
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);
    TestClient clientC = new TestClient("C", testConnection);
   
View Full Code Here

  private static final Logger logger = Logger.getLogger(OperationPerformanceTest.class.getSimpleName());

  @Test
  public void testOperationPerformance() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
   
    Config configA = TestConfigUtil.createTestLocalConfig("A", testConnection);
    Config configB = TestConfigUtil.createTestLocalConfig("B", testConnection);
   
    // Add new files on A and upload it
View Full Code Here

    ConfigTO confRestored = ConfigTO.load(tmpFile);
    TransferPlugin plugin = Plugins.get(confRestored.getTransferSettings().getType(), TransferPlugin.class);
    assertNotNull(plugin);

    TransferSettings tsRestored = confRestored.getTransferSettings();
    assertNotNull(tsRestored);

    DummyTransferManager transferManager = plugin.createTransferManager(tsRestored, config);
    assertNotNull(transferManager);
  }
View Full Code Here

public class RestrictedXmlCharInFilenameScenarioTest {
  @Test
  public void testEmptyFileCreateAndSync() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
   
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);
   
    // A
View Full Code Here

  @Test
  public void testRenameFileButDestinationExists() throws Exception {
    // Scenario: A moves a file, but B creates another file at the same destination
   
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
   
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);
   
    // A new/up
View Full Code Here

  @Test
  public void testDeleteFileThatHasAlreadyMoved() throws Exception {
    // Scenario: A deletes a file that B has already moved
   
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
   
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);
   
    // A new/up
View Full Code Here

public class FolderPermissionChangeScenarioTest {
  @Test
  public void testFolderPermissionChange() throws Exception {   
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();   
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);

    // Run
    clientA.createNewFolder("Somefolder");
View Full Code Here

public class RestoreFileScenarioTest {
  @Test
  public void testRestoreDeletedFile() throws Exception {
    // Setup
    File tempDir = TestFileUtil.createTempDirectoryInSystemTemp();
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();   
    TestClient clientA = new TestClient("A", testConnection);
    java.sql.Connection databaseConnectionA = DatabaseConnectionFactory.createConnection(clientA.getDatabaseFile());
       
    // A new/up
    clientA.createNewFile("A-original");   
View Full Code Here

TOP

Related Classes of org.syncany.plugins.transfer.TransferSettings

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.