2011-07-07 32 views
3

我正在为Oracle(10g)存储过程编写测试工具。我打算使用@Transactional测试来运行存储过程,以便在测试结束时回滚事务。所以,我的测试看起来像:在提交之前查看Oracle会话中的所有DML更改

@ContextConfiguration(locations = "classpath:spring/ITestAssembly.xml") 
@RunWith(SpringJUnit4ClassRunner.class) 
public class ContentGenerationRunnerTest { 

    @Autowired 
    private JdbcTemplate jdbcTemplate; 

    @Test 
    @Transactional 
    public void contentIncShouldRun() throws Exception { 
     new ContentGenerationRunner().runVclBec(jdbcTemplate); 
    } 
} 

我可以断言,正确的更新已经做出,因为修改本地测试的会议将是测试方法中可见。

但是,为了制定更严格的断言,能够检查会话中已调用但尚未落实的DML语句的完整列表将很方便。有没有办法我可以看到这个?

回答

相关问题