| Author |
Junit, Jmock test: how to test a void method
|
Mi Na Mi
Greenhorn
Joined: Jan 09, 2012
Posts: 4
|
|
Hello,
I'd like to ask a question, how can I test a void method.
For example smth like this
Class A{
void method(){
...
some objects, which state can be changed.
...
}
}
I mock some objects, but I have no idea how to test a method which does not return anything....
Thank you
|
 |
Hebert Coelho
Ranch Hand
Joined: Jul 14, 2010
Posts: 754
|
|
Does the method throws an Exception?
Does the method change the stated of an object (that goes as parameter)?
|
[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
|
 |
 |
|
|
subject: Junit, Jmock test: how to test a void method
|
|
|