Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 170621 - Create test ignores "Class Types"
Create test ignores "Class Types"
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: JUnit
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Victor Vasilyev
junit-issues@java
:
Depends on: 165914
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-19 13:50 UTC by pribyl
Modified: 2010-04-15 12:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pribyl 2009-08-19 13:50:20 UTC
Product Version: NetBeans IDE Dev (Build 200908171401)
Java: 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

I have a Java project with four classes in a package: public class, package private class, abstract class and Exception
class.
When I select the containing package and invoke Tools - Create JUnit test, no matter which options I check under the
"Class Types" I still get four tests generated. One for each class.

Maybe I just get it wrong. According to Help you should be able to select which class types to generate test classes
for. However it does not seem to work.
Comment 1 Victor Vasilyev 2009-11-11 17:38:03 UTC
It is valid issue.
All options "Code Generation / Class Types" in the "Create Tests" dialog do not work.
Comment 2 Victor Vasilyev 2010-04-14 14:22:28 UTC
It is regression after http://hg.netbeans.org/main/rev/1c5ab8f7d046

The statement 
http://hg.netbeans.org/main/file/1c5ab8f7d046/junit/src/org/netbeans/modules/junit/TestGeneratorSetup.java#l717
sets to zero all bits in the variable "result" excluding a bit returned by the method TestabilityResult.NO_TESTEABLE_METHODS.getReasonValue(), i.e 0x2.
Hence, all classes are testable if they have testable methods, and it doesn't depend on states of the checkboxes in the "Class Types" group of the "Create Tests" dialog.
Comment 3 Victor Vasilyev 2010-04-15 11:54:13 UTC
This bug a relation to the Bug 165914
Comment 4 Victor Vasilyev 2010-04-15 12:33:59 UTC
Fixed
http://hg.netbeans.org/main/rev/6ed2919e6def

See also bug 165914


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo