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.

Bug 141165 - [65cat] The Create Tests dialogue should not give warning about non-default class names
Summary: [65cat] The Create Tests dialogue should not give warning about non-default c...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-22 14:19 UTC by _ theanuradha
Modified: 2010-02-17 22:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot (26.64 KB, image/png)
2008-07-22 14:21 UTC, _ theanuradha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2008-07-22 14:19:50 UTC
[ JDK VERSION : 1.6.0_07 ]

see screenshot
Comment 1 _ theanuradha 2008-07-22 14:21:22 UTC
Created attachment 65239 [details]
screen shot
Comment 2 Marian Petras 2008-07-25 01:03:31 UTC
In short:
- the projects infrastructure still uses a pattern "*Test.java" for finding JUnit test classes,
  no matter whether it is JUnit 3.x or JUnit 4.x
- there is a bug that the dialogue warns about non-default name of a test class, while it it should only warn
  if the test class does not end with "Test"
Comment 3 Marian Petras 2008-07-30 13:52:52 UTC
I will fix this one together with bug #141166 ("wrong error Test class name contain space in the end").
Comment 4 Jiri Vagner 2008-09-29 16:01:09 UTC
Yes, jUnit4.x test classes can have name without "Test" name suffix, but you can also create and execute inside ide
jUnit 3.x test class without "Test" name suffix. This is not a problem.

Problem is that ide offers you a handy navigation between code class and corresponding test class. (Navigate > Go to
Test/Tested Class). And this feature works only while user follows naming convetion - ...Test.java. Maybe mpetras will
create some smart technique for navigation between classes and tests without using name convention, but I'm sure, that
it will be not fixed in 6.5 release. >> I changed target milestone to "future".





Comment 5 Jiri Vagner 2008-09-30 10:18:28 UTC
I discussed this issue with ppis and tpavek. I will remove red color. This warning msg is not so important, because ide
is able to create test class with any suitable name and is be able to execute that class. Only when a new class name
does not follow pattern "TestedClassName" + "Test.java", navigation between tested class file and test class file will
not work. So we need only better warning msg about this navigation issue. Kenneth, please, can you help me with a new
warning msg about this issue?
Comment 6 Kenneth Ganfield 2008-12-03 12:58:32 UTC
My suggestion for a new message:

You will not be able to navigate between the test class and the tested class if a non-default name is used.
Comment 7 Alexei Mokeev 2009-03-05 13:50:35 UTC
Assigning issues from Michael to Andrey.
Comment 8 Andrey Yamkovoy 2009-03-25 11:17:22 UTC
Fixed. For non-default name and name without "Test" at the end the different messages are displayed.
Comment 9 Quality Engineering 2009-03-26 14:29:43 UTC
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/517842c002d8
User: Andrey Yamkovoy <kaktus@netbeans.org>
Log: Fix for #141165 - [65cat] The Create Tests dialogue should not give warning about non-default class names
Comment 10 Quality Engineering 2010-02-17 22:01:41 UTC
Integrated into 'main-golden', will be available in build *201002180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5fc40bb20dcb
User: Alexei Mokeev <av-nb@netbeans.org>
Log: Fixed test (changes from #141165 fix were not reflected in test)