This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Testing in JUnit4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Testing in JUnit4" Watch "Testing in JUnit4" New topic
Author

Testing in JUnit4

Robert Raps
Ranch Hand

Joined: Mar 13, 2013
Posts: 30
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

Joined: May 22, 2012
Posts: 866
    
    5
> 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: Маленький сад, очень рад!


 
jQuery in Action, 2nd edition
 
subject: Testing in JUnit4
 
Similar Threads
Equals Method, greatherThan lessThan methods
Date Function
Subtract 2 Dates
How to display in Hindi using Internationalisation through struts 1.3
datetimepicker.js