aspose file tools*
The moose likes Testing and the fly likes junit throwing exception to pass the test Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "junit throwing exception to pass the test" Watch "junit throwing exception to pass the test" New topic
Author

junit throwing exception to pass the test

Juan Villena
Greenhorn

Joined: Aug 27, 2011
Posts: 20


***AFTER TESTING -- THIS IS THE ERROR ***
Failure: junit.framework.ComparisonFailure: null expected:<[unrecognized token:]$> but was:<[]$>

Hello Everyone, i need some help about throwing an exception in my Junit Test
I am trying throw an exception and pass the test, when the input String found the symbol $
Any Suggestion??

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29249
    
139

The code looks fine. Can you show the test as well? (Note there are code tags that make the code easier to read. I added them to your first post. You can find them right below the subject line when editing.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: junit throwing exception to pass the test
 
Similar Threads
Null pointer exception when trying to enter a blank for a response -- how to fix?
Head First Java Ready-Bake Code
Help with ArrayList
Head First Java - pg 135 - ArrayList and Compile Errors
Java Development Tools