Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

junit throwing exception to pass the test

 
Juan Villena
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


***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
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic