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 PluginConfigurationHibernateDaoTest extends AbstractTransactionalTestNGSpringContextTests { 
    @Autowired 
    private SessionFactory sessionFactory; 
    @Autowired 
    private PluginConfigurationDao pluginConfigurationDao; 
    private Session session; 
 
    @BeforeMethod 
    public void init() { 
        this.session = sessionFactory.getCurrentSession(); 
        PersistedObjectsFactory.setSession(session); 
    } 
 
    /*===== Common methods =====*/ 
 
Experience pair programming with AI  Get Codota for Java