コード例 #1
0
 @Before
 public void onSetUpInsertTestDatas() throws Exception {
   String jdbcSchema = null; // set schema for oracle,出现AmbiguousTableNameException时,使用命令:purge
   // recyclebin清空一下oracle回收站
   dbUnitHelper.setDataSource(getDataSource(), jdbcSchema);
   dbUnitHelper.insertTestDatas(getDbUnitDataFiles());
 }
コード例 #2
0
 protected void insertTestData(String classpathFileName) {
   try {
     dbUnitHelper.insertTestData(ResourceUtils.getFile("classpath:" + classpathFileName));
   } catch (Exception e) {
     throw new RuntimeException("insertTestData error,classpathFileName:" + classpathFileName, e);
   }
 }