File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Junit control flow.

 
tarun mall
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic