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.
If a source file contains abstract classes, generated test cannot test them without providing simple implementations of these abstract classes. Apparently, this ability used to be available but was removed during transition to the new Java infrastructure (i.e. NB 6.0 M5 and later).
Ability to generate subclasses of abstract classes was last available in revision 1.61 of class org.netbeans.modules.junit.TestCreator.
Fixed. Changeset Id: 9088a9fcc2c7 (http://hg.netbeans.org/main/rev/9088a9fcc2c7)
Integrated into 'main-golden', will be available in build *200811010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9088a9fcc2c7 User: Marian Petras <mpetras@netbeans.org> Log: fixed bug #124648 - "Generate simple implementation of abstract classes in tests"
I have found a small issue with the fix: If the test class already contains multiple nested classes extending the abstract source class (to be tested), the default test method bodies always use instances of the first such a nested class, ignoring its name and names of the other nested class. I will change it such that if any of the nested classes is named <src-class-name>Impl, that one will be used.
Integrated into 'main-golden', will be available in build *200811041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/48ba7223ea4c User: Marian Petras <mpetras@netbeans.org> Log: improved fix of bug #124648 - if possible, choose the nested class having the default name