Extending NbTestCase causes strange things to happen
"bbergeson" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Are we not suppose to extend NbTestCase any longer? I have a very simple class, along with a test class. If the test class extends NbTestCase then the following things happen: 1. It does not recognize the @Ignore annotation 2. If I add a new test method, not matching any method in my original class, it will not get executed. If I go into the original class and add a method that matches my test method then the test method will get executed and I can even change the test method name afterwards and it will still get executed. 3. If I modify a test method that originally matched a method in the original class and is being executed to a different name such that it doesn't match any method in the original class, it will still get executed. It's acts as if the method has been cached, and once cached I can change it to anything and it will still get executed, but if the method never matched a method in the original class then it does not get cached and will never get executed. If I do NOT extend NbTestCase everything works as expected. I can methods to the test class that does not match any methods in the original class and they all get executed. Are we not suppose to extend NbTestCase any longer? What is it's purpose? Finally, if I right click on my Suite and select Test then all the methods of my test class get run 4 times. Extending or not extending NbTestCase does not affect this. It appears that my test class is being executed 4 times. I only have one other module that depends on this module.