@Test public void testCreateService() { assertTrue(serviceDao.findAll().isEmpty()); serviceDao.create(service1); assertEquals(serviceDao.findAll().size(), 1); }
@Test public void testFindAllServices() { serviceDao.create(service1); List<Service> foundServices = serviceDao.findAll(); assertTrue(foundServices.contains(service1)); assertFalse(foundServices.contains(service2)); serviceDao.create(service2); foundServices = serviceDao.findAll(); assertTrue(foundServices.contains(service1)); assertTrue(foundServices.contains(service2)); }