Added tests for service-layer pattern

This commit is contained in:
Jeroen Meulemeester
2015-12-29 01:19:46 +01:00
parent 52c483f1d0
commit fcfdbe71f5
11 changed files with 453 additions and 29 deletions
@@ -1,12 +1,12 @@
package com.iluwatar.servicelayer.spell;
import com.iluwatar.servicelayer.common.DaoBaseImpl;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
import com.iluwatar.servicelayer.common.DaoBaseImpl;
/**
*
* SpellDao implementation.
@@ -24,7 +24,6 @@ public class SpellDaoImpl extends DaoBaseImpl<Spell> implements SpellDao {
Criteria criteria = session.createCriteria(persistentClass);
criteria.add(Restrictions.eq("name", name));
result = (Spell) criteria.uniqueResult();
result.getSpellbook().getWizards().size();
tx.commit();
} catch (Exception e) {
if (tx != null) {