Code example for AbstractTransactionalTestNGSpringContextTests

0
 * 
 * @author vitaly.yakunin 
 */ 
@ContextConfiguration(locations = {"classpath:applicationContext-test.xml","classpath:dozer-application-context-test.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 
public class ResourceDAOTouchTest extends AbstractTransactionalTestNGSpringContextTests {
    @Autowired 
    private ResourceDAO resourceDAO;
 
    @Test
    public void touchAdd() { 
        resourceDAO.add(new ResourceEntity());
    } 
    @Test
    public void touchAddResourceRolePrivilege() { 
        ResourceEntity entity = new ResourceEntity();
        resourceDAO.add(entity);
        resourceDAO.addResourceRolePrivilege(entity.getResourceId(), "", "");
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java