checkAndNotify(); checkCollectionsEmpty("A"); final File testDirA = new File(testDir, "test-dir-A"); final File testDirBFile1 = touch(new File(testDirB, "B-file1.java")); checkAndNotify(); checkCollectionSizes("B", 3, 0, 0, 4, 0, 0); assertTrue("B testDirA", listener.getCreatedDirectories().contains(testDirA)); assertTrue("B testDirBFile1", listener.getCreatedFiles().contains(testDirBFile1)); checkAndNotify(); checkCollectionsEmpty("C"); checkAndNotify(); checkCollectionSizes("D", 0, 0, 1, 0, 1, 1); assertTrue("D testDirB", listener.getDeletedDirectories().contains(testDirB)); checkAndNotify(); checkCollectionSizes("E", 0, 0, 2, 0, 0, 3); assertTrue("E testDirA", listener.getDeletedDirectories().contains(testDirA)); checkAndNotify(); checkCollectionsEmpty("F"); checkAndNotify(); checkCollectionsEmpty("G");
checkAndNotify(); checkCollectionsEmpty("A"); File testDirA = new File(testDir, "test-dir-A"); assertTrue("B testDirAFile5 exists", testDirAFile5.exists()); checkAndNotify(); checkCollectionSizes("B", 1, 0, 0, 5, 0, 0); assertTrue("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1)); assertTrue("B testDirAFile5", listener.getCreatedFiles().contains(testDirAFile5)); checkAndNotify(); checkCollectionsEmpty("C"); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 0, 0, 1); assertFalse("D testDirAFile1 exists", testDirAFile1.exists()); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 0, 0, 1); assertFalse("E testDirAFile3 exists", testDirAFile3.exists()); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 0, 0, 1); assertFalse("F testDirAFile5 exists", testDirAFile5.exists());
checkAndNotify(); checkCollectionsEmpty("A"); File testDirA = new File(testDir, "test-dir-A"); File testDirAFile5 = new File(testDirA, "A-file5.java"); checkAndNotify(); checkCollectionSizes("B", 1, 0, 0, 2, 0, 0); assertFalse("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1)); assertFalse("B testDirAFile5 exists", testDirAFile5.exists()); checkAndNotify(); checkCollectionsEmpty("C"); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 1, 0, 0); assertTrue("D testDirAFile1 exists", testDirAFile1.exists()); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 1, 0, 0); assertTrue("E testDirAFile3 exists", testDirAFile3.exists()); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 1, 0, 0); assertTrue("F testDirAFile5 exists", testDirAFile5.exists());
checkAndNotify(); checkCollectionsEmpty("A"); assertFalse("A testDirAFile1 exists", testDirAFile1.exists()); assertTrue("B testDirAFile2 exists", testDirAFile2.exists()); assertTrue("B testDirAFile3 exists", testDirAFile3.exists()); checkAndNotify(); checkCollectionSizes("C", 0, 0, 0, 1, 0, 0); assertTrue("C created", listener.getCreatedFiles().contains(testDirAFile1)); testDirAFile2 = touch(testDirAFile2); testDirAFile3 = touch(testDirAFile3); checkAndNotify(); checkCollectionSizes("D", 0, 0, 0, 0, 1, 0); assertTrue("D changed", listener.getChangedFiles().contains(testDirAFile1)); assertFalse("E testDirAFile2 exists", testDirAFile2.exists()); assertFalse("E testDirAFile3 exists", testDirAFile3.exists()); checkAndNotify(); checkCollectionSizes("E", 0, 0, 0, 0, 0, 1); assertTrue("E deleted", listener.getDeletedFiles().contains(testDirAFile1));
checkAndNotify(); checkCollectionsEmpty("A"); File testDirA = new File(testDir, "test-dir-A"); File testDirAFile5 = touch(new File(testDirA, "A-file5.java")); checkAndNotify(); checkCollectionSizes("B", 1, 0, 0, 5, 0, 0); assertTrue("B testDirAFile1", listener.getCreatedFiles().contains(testDirAFile1)); assertTrue("B testDirAFile5 exists", testDirAFile5.exists()); checkAndNotify(); checkCollectionsEmpty("C"); checkAndNotify(); checkCollectionSizes("D", 0, 1, 0, 0, 1, 0); assertTrue("D testDirAFile1", listener.getChangedFiles().contains(testDirAFile1)); checkAndNotify(); checkCollectionSizes("E", 0, 1, 0, 0, 1, 0); assertTrue("E testDirAFile3", listener.getChangedFiles().contains(testDirAFile3)); checkAndNotify(); checkCollectionSizes("F", 0, 1, 0, 0, 1, 0); assertTrue("F testDirAFile5", listener.getChangedFiles().contains(testDirAFile5));