Code example for AbstractTransactionalTestNGSpringContextTests

0
 * 
 * @author Sam Brannen 
 * @since 4.1 
 */ 
@ContextConfiguration 
public class ProgrammaticTxMgmtTestNGTests extends AbstractTransactionalTestNGSpringContextTests { 
 
	private String method; 
 
 
	@Override 
	public void run(IHookCallBack callBack, ITestResult testResult) { 
		this.method = testResult.getMethod().getMethodName(); 
		super.run(callBack, testResult); 
	} 
 
	@BeforeTransaction 
	public void beforeTransaction() { 
		deleteFromTables("user"); 
		executeSqlScript("classpath:/org/springframework/test/context/jdbc/data.sql", false);