use of com.iluwatar.servicelayer.spell.SpellDao in project java-design-patterns by iluwatar.
the class MagicServiceImplTest method testFindAllWizards.
@Test
public void testFindAllWizards() throws Exception {
final WizardDao wizardDao = mock(WizardDao.class);
final SpellbookDao spellbookDao = mock(SpellbookDao.class);
final SpellDao spellDao = mock(SpellDao.class);
final MagicServiceImpl service = new MagicServiceImpl(wizardDao, spellbookDao, spellDao);
verifyZeroInteractions(wizardDao, spellbookDao, spellDao);
service.findAllWizards();
verify(wizardDao).findAll();
verifyNoMoreInteractions(wizardDao, spellbookDao, spellDao);
}
Aggregations