This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
From build 20041018-1530 test methods are not generated after action "Create Tests". Commit log says there were changes in templates, so this is probably cause of problem. It also breaks the commit validation suite. To reproduce: - create a java project - create a java class with public, protected, default and private methods - generate test by action "Tools|JUnit Tests|Create Tests" - only testMain method is generated but not tests for other methods. Build 20041018-2324, JDK1.5.0, WindowsXP.
Fixed - I rollbacked the change which caused this bug.
The bug was not caused by the last commit to JUnit. It is probably outside the module. a) I tried it before I commited, including commit-validation tests and it worked. b) I just checked-out all other sources, thus, with the changes to templates still in, tried it out and it didn't work. I'm reopening it. I'll investigate the real cause and reassign to the responsible module.
The bug is in java-jmi. The problem is that the class doesn't appear to contain the methods (obtained through JavaClass.getFeatures) until after IDE restart. After restart, it works fine - the methods are there. It is not enough to explicitly save the file. It is not enough to close and reopen the project, the ide must be restarted.
Maybe issue 50590 is also related.
Good point! It looks very much like it. In issue 50590, Hanz says: > Looks like problem is caused by src hierarchy. > The piece of code [snip] > returns SourceElement in place of MethodElement! In JUnit, I filter all features returned by JavaClass.getFeatures and only MethodElement instances are processed further.
Fixed. *** This issue has been marked as a duplicate of 50591 ***
Verified in build 20041019-2335.