@Test public void whenFindAllItShouldReturnEmpty() { daoTestRule.inTransaction(() -> { List<EventHibernateEntity> actual = dao.findAll(); assertThat(actual) .isNotNull() .isEmpty(); }); }
@Override public List<EventHibernateEntity> findAll() { return list(namedQuery(EventHibernateEntity.QUERY_FIND_ALL)); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public List<EventHibernateEntity> findAll() { return list(namedQuery(EventHibernateEntity.QUERY_FIND_ALL)); } }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public List<EventHibernateEntity> findAll() { return list(namedQuery(EventHibernateEntity.QUERY_FIND_ALL)); } @Inject  EventDao(SessionFactory sessionFactory); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public List<EventHibernateEntity> findAll() { return list(namedQuery(EventHibernateEntity.QUERY_FIND_ALL)); } @Inject  EventDao(SessionFactory sessionFactory); @Override EventHibernateEntity findById(String id); @Override List<EventHibernateEntity> findAll(); @Override void create(EventHibernateEntity event); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public List<EventHibernateEntity> findAll() { return list(namedQuery(EventHibernateEntity.QUERY_FIND_ALL)); } @Inject  EventDao(SessionFactory sessionFactory); @Override EventHibernateEntity findById(String id); @Override List<EventHibernateEntity> findAll(); @Override void create(EventHibernateEntity event);  }