I am trying to unit test this code block in a method in my service layer. Could anyone suggest what can (/should) I test here and how to test them (esp. the insert to db part). Any pointers (/example code/doc) will be very helpful.
if (element != null) {
id = iplDAO.loadGames(element,batchVO.getId());
iplPartyDetailsVO = element.getParty();
if iplPartyDetailsVO != null) {
try {
iplDAO.insertPartyDetails(iplPartyDetailsVO, id,batchVO.getId());
} catch (Exception e) {
logger.logp("className");
String err = "blah";
iplDAO.insertIntoError(err_t);
}
}
Aucun commentaire:
Enregistrer un commentaire