Code example for AbstractTransactionalTestNGSpringContextTests

0
 * @author Evgeniy Naumenko 
 */ 
@ContextConfiguration(locations = {"classpath:/org/jtalks/jcommune/model/entity/applicationContext-dao.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 
@Transactional 
public class ValidatorHibernateDaoTest extends AbstractTransactionalTestNGSpringContextTests { 
 
    @Autowired 
    private SessionFactory sessionFactory; 
    @Autowired 
    ValidatorDao<String> dao; 
 
    @Test 
    public void testResultSetisEmptyNoField() { 
        assertTrue(dao.isResultSetEmpty(JCUser.class, "username", "lol", false)); 
    } 
     
    @Test 
    public void testResultSetIsEmptyDifferentCases() { 
        String realname = ObjectsFactory.getDefaultUser().getUsername().toUpperCase(); 
Experience pair programming with AI  Get Codota for Java