Code example for AbstractTransactionalTestNGSpringContextTests

0
 * @author Anuar Nurmakanov 
 */ 
@ContextConfiguration(locations = {"classpath:/org/jtalks/jcommune/model/entity/applicationContext-dao.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 
@Transactional 
public class PollHibernateDaoTest extends AbstractTransactionalTestNGSpringContextTests { 
    @Autowired 
    private SessionFactory sessionFactory; 
    @Autowired 
    private Crud<Poll> pollDao; 
    private Session session; 
 
    @BeforeMethod 
    public void setUp() { 
        session = sessionFactory.getCurrentSession(); 
        PersistedObjectsFactory.setSession(session); 
    } 
 
    /*===== Common methods =====*/ 
 
Connect your IDE to all the code out there  Get Codota for Java