Author Login
Post Reply
Hi,
I need a way of mocking a static class using JMock. Consider the following
code snippet.
public class A {
void functionX() {
String name = ClassB.getName(); // Static function
}
}
public class ClassB {
static String getName() {
return 'ABC'
}
}
I need a way of mocking the static function 'getName'.Please note that I do
not have rights to modify the legacy code.
Any help would be highly appreciated.
Thanks,
Siddhi
--
Sent from the jMock - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email