• Post Reply Bookmark Topic Watch Topic
  • New Topic

Testing in JUnit4  RSS feed

 
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))
 
Rancher
Posts: 999
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: Маленький сад, очень рад!


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!