Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing in JUnit4

 
Robert Raps
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good evening. I am expecting for your help. I have troubles with testing methods. This is one.


It is test:

So, result:
* LuxoftUtilsTest testGetMonthName()
Июнь
June
December
Январь
* LuxoftUtilsTest - GetMonthName_checkExpectedException()
Unknown Language
java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.AssertionError> <17 internal calls>


Some horror characters is russian letters))
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.AssertionError> <17 internal calls>

The above line suggests that an AssertionError occurred whereas the test scaffolding was exception an IllegalArgumentException.

Some Russian characters for fun: Маленький сад, очень рад!


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic