Thanx for the quick reply. Ya. It is a test environment. I wanna test the method using JUnit. Please correct me if I am wrong, but as far as i know, we do not need a server (web/app) to be running while executing the JUnit test cases. I would like to quote here that the method to be tested is a factory method, not a web page. e.g.
Code:
class Factory extends SuperClass{
runTest(ResultSet) {
callOtherMethod(ResultSet);
}
}
class SuperClass {
callOtherMethod(ResultSet) {
ResultSetMetaData rsMeta = ResultSet.getMetaData();
rsMeta.getColumnCount();
rsMeta.getColumnName(i);
}
}
I have already mocked the ResultSet successfully. But how to mock ResultSetMetaData is the primary issue now. I hope I am more clear now.
Bookmarks