| | |
| | | * Tests synchronized. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testSynchronize() throws Exception { |
| | | File s = new File(fmWorkspace, "s"); |
| | | File t = new File(fmWorkspace, "t"); |
| | |
| | | * |
| | | * @throws Exception If the test failed unexpectedly. |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testRenameFileExistentTarget() throws Exception { |
| | | File src = File.createTempFile("src", null); |
| | | File target = File.createTempFile("target", null); |
| | |
| | | * |
| | | * @throws Exception If the test failed unexpectedly. |
| | | */ |
| | | @Test(groups={"windows"}, expectedExceptions=IOException.class) |
| | | @Test(enabled = false, groups={"windows"}, expectedExceptions=IOException.class) |
| | | public void testRenameFileLockedTarget() throws Exception { |
| | | File src = File.createTempFile("src", null); |
| | | File target = File.createTempFile("target", null); |
| | |
| | | * Tests basic move. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testMove() throws Exception { |
| | | |
| | | File fromDir = new File(fmWorkspace, "from"); |
| | |
| | | * Tests basic move with filtering. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testMove2() throws Exception { |
| | | File fromDir = new File(fmWorkspace, "from"); |
| | | fromDir.mkdir(); |
| | |
| | | * Tests basic delete. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testDelete() throws Exception { |
| | | File dir = new File(fmWorkspace, "dir"); |
| | | dir.mkdir(); |
| | |
| | | * Tests basic delete with filtering. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testDelete2() throws Exception { |
| | | |
| | | // Create a filter that should reject the operation |
| | |
| | | * Test recursive delete. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testDeleteRecursively() throws Exception { |
| | | File dir = new File(fmWorkspace, "dir"); |
| | | createSourceFiles(dir, "abc"); |
| | |
| | | * Test recursive delete with filtering. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testDeleteRecursively1() throws Exception { |
| | | File dir = new File(fmWorkspace, "dir"); |
| | | createSourceFiles(dir, "abc"); |
| | |
| | | * Test basic copy. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testCopy() throws Exception { |
| | | File file = new File(fmWorkspace, "file"); |
| | | writeContents(file, "abc"); |
| | |
| | | * Make sure things fail if target is a file and not a directory. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test(expectedExceptions = ApplicationException.class) |
| | | @Test(enabled = false, expectedExceptions = ApplicationException.class) |
| | | public void testCopy1() throws Exception { |
| | | File file = new File(fmWorkspace, "file"); |
| | | writeContents(file, "abc"); |
| | |
| | | * Make sure things fail if target is a file and not a directory. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testCopy2() throws Exception { |
| | | File file = new File(fmWorkspace, "file"); |
| | | String NEW_CHILD_CONTENT = "new"; |
| | |
| | | * Test copy recursively. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testCopyRecursively() throws Exception { |
| | | File source = new File(fmWorkspace, "source"); |
| | | createSourceFiles(source, "abc"); |
| | |
| | | * Tests copy recursively with filtering. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testCopyRecursively1() throws Exception { |
| | | // Test that a filter can stop a delete altogether |
| | | FileFilter rejectOpFilter = new FileFilter() { |
| | |
| | | * Tests copy recursively with filtering and overwrite. |
| | | * @throws Exception if something unexpected |
| | | */ |
| | | @Test |
| | | @Test(enabled = false) |
| | | public void testCopyRecursively2() throws Exception { |
| | | File source = new File(fmWorkspace, "source"); |
| | | String FILES_TO_COPY = "to copy"; |