aspose file tools
The moose likes Java in General and the fly likes Problem with JUnit testing class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Problem with JUnit testing class" Watch "Problem with JUnit testing class" New topic
Author

Problem with JUnit testing class

Jose Pérez
Greenhorn

Joined: Jul 19, 2009
Posts: 10
Hi again guys!

I have unknown trouble with my code. I have a class Planta, and I´m trying to make the JUnit test class for it.

Planta code is:



Then, I start JUnit class and try to do this in it:



Eclipse says in planta1.setInferior(planta0); sentence:

Multiple markers at this line
- Syntax error on token "planta0", VariableDeclaratorId expected after this token
- Syntax error on token(s), misplaced construct(s)


I have made another JUnit test classes, but now I cannot see where the problem is.

Regards.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You're trying to run code in a class definition. Make a method.
Jose Pérez
Greenhorn

Joined: Jul 19, 2009
Posts: 10
That´s it -.-' , thank you David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JUnit testing class
 
Similar Threads
Event Handlers:Mouse over "circles"
Thread.sleep question
JLabels are not visible
calling another method from another class, interface issue
Some painting problem