|Problem With JUnit in Lesson 6 [message #648975]
||Mon, 17 January 2011 02:32
| Michael Satterwhite
Registered: January 2011
I'm as new as they come to Eclipse. I'm going through the (EXCELLENT!) tutorials, and am having a problem in Lesson 6. I've googled everything I can think of (which probably means I'm not thinking straight) and can find nothing.|
In this lesson, we create another test procedure, testToString(). When I tell Eclipse to rerun the test, this new test does not get executed. In the tutorial, all that he does is to rerun the test, there is nothing that would add the new procedure to the tests that should be run. In the package explorer, the new test is clearly seen by Eclipse. It just isn't being run.
I do note that I have JUnit 4 installed, and the tutorial references JUnit 3. That may be irrelevant, but I mention it to be complete.
I'm sure this fix is simple - and probably obvious - but I don't see it.
Thanks in advance to anyone who can help.
|Re: Problem With JUnit in Lesson 6 *SOLVED* [message #649151 is a reply to message #649133]
||Mon, 17 January 2011 22:21
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 2011.01.17 13:10, Michael Satterwhite wrote:|
> Russell Bateman wrote on Sun, 16 January 2011 23:38
>> On 2011.01.16 > I noted that the procedures created by Eclipse had
>> "@Test" immediately
>> > preceding the declaration. This is not in the tutorial example. I
>> > this line immediately prior to my new procedure, and it was recognized
>> > as a test.
>> That annotation is new with JUnit 4; it wasn't in JUnit 3.
> I figured that, but do appreciate the confirmation. I find it
> interesting that now I can't create a JUnit 4 module, only JUnit 3. If I
> select JUnit 4, it eliminates the ability to select the superclass and
> sets the superclass to java.lang.Object.
I think that's intentional although I haven't thought deeply enough
about it to decide why. I don't always use Eclipse wizards to their
fullest extent, preferring to write the code myself.
Powered by FUDForum
. Page generated in 0.03720 seconds