File testDirA = new File(testDir, "test-dir-A"); testDirA.mkdir(); testDir = touch(testDir); testDirA = touch(testDirA); File testDirAFile1 = touch(new File(testDirA, "A-file1.java")); final File testDirAFile2 = touch(new File(testDirA, "A-file2.java")); File testDirAFile3 = touch(new File(testDirA, "A-file3.java")); final File testDirAFile4 = touch(new File(testDirA, "A-file4.java")); File testDirAFile5 = touch(new File(testDirA, "A-file5.java")); testDirAFile1 = touch(testDirAFile1); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 0, 1, 0); testDirAFile3 = touch(testDirAFile3); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 0, 1, 0); testDirAFile5 = touch(testDirAFile5); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 0, 1, 0);
File testDirA = new File(testDir, "test-dir-A"); testDirA.mkdir(); testDir = touch(testDir); testDirA = touch(testDirA); File testDirAFile1 = new File(testDirA, "A-file1.java"); final File testDirAFile2 = touch(new File(testDirA, "A-file2.java")); File testDirAFile3 = new File(testDirA, "A-file3.java"); final File testDirAFile4 = touch(new File(testDirA, "A-file4.java")); File testDirAFile5 = new File(testDirA, "A-file5.java"); testDirAFile1 = touch(testDirAFile1); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 1, 0, 0); testDirAFile3 = touch(testDirAFile3); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 1, 0, 0); testDirAFile5 = touch(testDirAFile5); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 1, 0, 0);
File testDirA = new File(testDir, "test-dir-A"); testDirA.mkdir(); testDir = touch(testDir); testDirA = touch(testDirA); final File testDirAFile1 = touch(new File(testDirA, "A-file1.java")); final File testDirAFile2 = touch(new File(testDirA, "A-file2.java")); final File testDirAFile3 = touch(new File(testDirA, "A-file3.java")); final File testDirAFile4 = touch(new File(testDirA, "A-file4.java")); final File testDirAFile5 = touch(new File(testDirA, "A-file5.java")); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 0, 0, 1); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 0, 0, 1); testDirA = touch(testDirA); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 0, 0, 1);
testDirAFile1 = touch(testDirAFile1); File testDirAFile2 = touch(new File(testDirA, "A-file2.txt")); /* filter should ignore */ File testDirAFile3 = touch(new File(testDirA, "A-file3.java")); /* filter should ignore */ assertTrue("B testDirAFile1 exists", testDirAFile1.exists()); assertTrue("B testDirAFile2 exists", testDirAFile2.exists()); testDirAFile1 = touch(testDirAFile1); testDirAFile2 = touch(testDirAFile2); testDirAFile3 = touch(testDirAFile3); checkAndNotify(); checkCollectionSizes("D", 0, 0, 0, 0, 1, 0);
testDirB.mkdir(); testDirC.mkdir(); final File testDirAFile1 = touch(new File(testDirA, "A-file1.java")); final File testDirAFile2 = touch(new File(testDirA, "A-file2.txt")); // filter should ignore this final File testDirAFile3 = touch(new File(testDirA, "A-file3.java")); File testDirAFile4 = touch(new File(testDirA, "A-file4.java")); final File testDirBFile1 = touch(new File(testDirB, "B-file1.java")); checkCollectionsEmpty("C"); testDirAFile4 = touch(testDirAFile4); FileUtils.deleteDirectory(testDirB); checkAndNotify();