@Test public void whenCreateItShouldCreateEvent() { EventHibernateEntity newEvent = buildUnsavedEvent(); daoTestRule.inTransaction(() -> { dao.create(newEvent); }); assertThat(newEvent.getId()) .isNotEmpty(); }
@Override public void create(EventHibernateEntity event) { persist(event); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public void create(EventHibernateEntity event) { persist(event); } }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public void create(EventHibernateEntity event) { persist(event); } @Inject  EventDao(SessionFactory sessionFactory); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public void create(EventHibernateEntity event) { persist(event); } @Inject  EventDao(SessionFactory sessionFactory); @Override EventHibernateEntity findById(String id); @Override List<EventHibernateEntity> findAll(); @Override void create(EventHibernateEntity event); }
EventDao extends BaseHibernateEntityDao<EventHibernateEntity> { @Override public void create(EventHibernateEntity event) { persist(event); } @Inject  EventDao(SessionFactory sessionFactory); @Override EventHibernateEntity findById(String id); @Override List<EventHibernateEntity> findAll(); @Override void create(EventHibernateEntity event);  }