Community
Participate
Working Groups
master. We need to add test cases for bug 357450.
Created attachment 225630 [details] Patch-test cases for bug 357450 Added the test class 'ContentProviderTests6' and also added it to the 'PackageExplorerTests' suite. The test class contains 4 test cases: 1. Add a file to class folder 2. Add a folder to class folder 3. Remove a file from class folder 4. Remove a folder from class folder Each test case checks for the refreshed objects after the action is performed and verifies that both the library container and the class folder resource are refreshed.
One observation.. The field 'IPackageFragmentRoot classFolder' should be renamed as 'fClassFolder'.
Thanks for the patch Noopur! The tests fail without the fix from bug 357450 and pass with the fix. I've committed the patch to 'master' after fixing the copyright (for new files we only have to add the current year, see code in 'master'). Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=9a9b9d6fd7d116505f8f2933d6c8047f391e366a I see you copied the code from one of the other tests. Do you like that some of the fields are used only inside a single method but still declared as fields? I don't too much, so fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=d38770e79f7539a02c04283db1973de6d2729d5a
(In reply to comment #3) > Thanks for the patch Noopur! > > The tests fail without the fix from bug 357450 and pass with the fix. I've > committed the patch to 'master' after fixing the copyright (for new files we > only have to add the current year, see code in 'master'). > > Fixed with > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/ > ?id=9a9b9d6fd7d116505f8f2933d6c8047f391e366a > > > I see you copied the code from one of the other tests. Do you like that some > of the fields are used only inside a single method but still declared as > fields? I don't too much, so fixed with > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/ > ?id=d38770e79f7539a02c04283db1973de6d2729d5a Thanks Dani. I will take care of the above from now on i.e. adding copyright to new files and not declaring the variables used only inside a method as fields.