Search in sources :

Example 11 with TransferPlugin

use of org.syncany.plugins.transfer.TransferPlugin in project syncany by syncany.

the class TransferSettingsTest method createNewValidConnectionTO.

@Test
public void createNewValidConnectionTO() throws Exception {
    TransferPlugin p = Plugins.get("dummy", TransferPlugin.class);
    DummyTransferSettings ts = p.createEmptySettings();
    ts.foo = "foo-value";
    ts.number = 5;
    assertTrue(ts.isValid());
}
Also used : DummyTransferPlugin(org.syncany.plugins.dummy.DummyTransferPlugin) TransferPlugin(org.syncany.plugins.transfer.TransferPlugin) DummyTransferSettings(org.syncany.plugins.dummy.DummyTransferSettings) Test(org.junit.Test)

Example 12 with TransferPlugin

use of org.syncany.plugins.transfer.TransferPlugin in project syncany by syncany.

the class TestConfigUtil method createTestLocalConnection.

public static TransferSettings createTestLocalConnection() throws Exception {
    TransferPlugin plugin = Plugins.get("local", TransferPlugin.class);
    LocalTransferSettings conn = plugin.createEmptySettings();
    File tempRepoDir = TestFileUtil.createTempDirectoryInSystemTemp(createUniqueName("repo", conn));
    conn.setPath(tempRepoDir);
    // TODO [medium] : possible problem
    plugin.createTransferManager(conn, null).init(true);
    return conn;
}
Also used : TransferPlugin(org.syncany.plugins.transfer.TransferPlugin) UnreliableLocalTransferPlugin(org.syncany.plugins.unreliable_local.UnreliableLocalTransferPlugin) LocalTransferSettings(org.syncany.plugins.local.LocalTransferSettings) UnreliableLocalTransferSettings(org.syncany.plugins.unreliable_local.UnreliableLocalTransferSettings) File(java.io.File)

Aggregations

TransferPlugin (org.syncany.plugins.transfer.TransferPlugin)12 TransferSettings (org.syncany.plugins.transfer.TransferSettings)7 Test (org.junit.Test)4 File (java.io.File)3 DummyTransferPlugin (org.syncany.plugins.dummy.DummyTransferPlugin)3 DummyTransferSettings (org.syncany.plugins.dummy.DummyTransferSettings)3 TransferManager (org.syncany.plugins.transfer.TransferManager)3 IOException (java.io.IOException)2 Persister (org.simpleframework.xml.core.Persister)2 ConfigTO (org.syncany.config.to.ConfigTO)2 LocalTransferSettings (org.syncany.plugins.local.LocalTransferSettings)2 StorageException (org.syncany.plugins.transfer.StorageException)2 TransactionAwareFeatureTransferManager (org.syncany.plugins.transfer.features.TransactionAwareFeatureTransferManager)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 UnknownHostException (java.net.UnknownHostException)1 Map (java.util.Map)1 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1 GZIPInputStream (java.util.zip.GZIPInputStream)1