This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing in JUnit4

 
Robert Raps
Ranch Hand
Posts: 30
  • 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
  • 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