aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes Problem with Junit control flow. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Problem with Junit control flow." Watch "Problem with Junit control flow." New topic
Author

Problem with Junit control flow.

tarun mall
Greenhorn

Joined: Nov 23, 2011
Posts: 13
Hi friends,

I wrote the following code which is not working as expected.



What I expect from this code is to print Tarun on console, but I am getting null on console. I tried to debug it and found that the String object in tosetUp() method and object in testmethod() are different. From where did this new object came? According to me the new object shouldn't come and if I am getting the flow right then I should get a NullPointer.
Can anyone please help?

Thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem with Junit control flow.
 
Similar Threads
Protected Method
Getting NPE while using Console
overloading question
Overloading or Overriding ?
does static methods inherit ? what about private ?