use of org.syncany.plugins.transfer.TransferSettings in project syncany by syncany.
the class SingleFileNoConflictsScenarioTest method testSingleFileNewNoConflicts.
@Test
public void testSingleFileNewNoConflicts() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
TestClient clientA = new TestClient("A", testConnection);
TestClient clientB = new TestClient("B", testConnection);
// Create files and upload
clientA.createNewFile("file");
clientA.up();
clientB.down();
assertFileEquals(clientA.getLocalFile("file"), clientB.getLocalFile("file"));
// Cleanup
clientA.deleteTestData();
clientB.deleteTestData();
}
use of org.syncany.plugins.transfer.TransferSettings in project syncany by syncany.
the class SingleFileNoConflictsScenarioTest method testSingleFileChangeNoConflicts.
@Test
public void testSingleFileChangeNoConflicts() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
TestClient clientA = new TestClient("A", testConnection);
TestClient clientB = new TestClient("B", testConnection);
// Create files and upload
clientA.createNewFile("file");
clientA.upWithForceChecksum();
clientB.down();
assertFileEquals(clientA.getLocalFile("file"), clientB.getLocalFile("file"));
clientB.changeFile("file");
clientB.upWithForceChecksum();
clientA.down();
assertFileEquals(clientA.getLocalFile("file"), clientB.getLocalFile("file"));
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
// Cleanup
clientA.deleteTestData();
clientB.deleteTestData();
}
use of org.syncany.plugins.transfer.TransferSettings in project syncany by syncany.
the class SingleFileNoConflictsScenarioTest method testSingleFileMoveNoConflicts.
@Test
public void testSingleFileMoveNoConflicts() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
TestClient clientA = new TestClient("A", testConnection);
TestClient clientB = new TestClient("B", testConnection);
// Create files and upload
clientA.createNewFile("file");
clientA.up();
clientB.down();
assertFileEquals(clientA.getLocalFile("file"), clientB.getLocalFile("file"));
clientB.moveFile("file", "moved");
clientB.up();
clientA.down();
assertFalse("Originally moved file should not exist.", clientA.getLocalFile("file").exists());
assertFileEquals(clientA.getLocalFile("moved"), clientB.getLocalFile("moved"));
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
// Cleanup
clientA.deleteTestData();
clientB.deleteTestData();
}
use of org.syncany.plugins.transfer.TransferSettings in project syncany by syncany.
the class SingleFolderNoConflictsScenarioTest method testFolderNonEmptyMove2NoConflicts.
@Test
public void testFolderNonEmptyMove2NoConflicts() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
TestClient clientA = new TestClient("A", testConnection);
TestClient clientB = new TestClient("B", testConnection);
// Create files and upload
clientA.createNewFolder("folder");
clientA.createNewFile("folder/file");
clientA.createNewFolder("folder/folder2");
clientA.createNewFile("folder/folder2/file2");
clientA.up();
clientB.down();
clientB.moveFile("folder", "moved");
clientB.up();
clientA.down();
assertFalse("Deleted folder should not exist.", clientA.getLocalFile("folder").exists());
assertFalse("Deleted file should not exist.", clientA.getLocalFile("folder/file").exists());
assertFileEquals(clientA.getLocalFile("moved"), clientB.getLocalFile("moved"));
assertFileEquals(clientA.getLocalFile("moved/file"), clientB.getLocalFile("moved/file"));
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
// Cleanup
clientA.deleteTestData();
clientB.deleteTestData();
}
use of org.syncany.plugins.transfer.TransferSettings in project syncany by syncany.
the class SingleFolderNoConflictsScenarioTest method testFolderEmptyNewNoConflicts.
@Test
public void testFolderEmptyNewNoConflicts() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
TestClient clientA = new TestClient("A", testConnection);
TestClient clientB = new TestClient("B", testConnection);
// Create files and upload
clientA.createNewFolder("folder");
clientA.up();
clientB.down();
assertFileEquals(clientA.getLocalFile("folder"), clientB.getLocalFile("folder"));
// Cleanup
clientA.deleteTestData();
clientB.deleteTestData();
}
Aggregations