Java 类org.springframework.jdbc.datasource.init.CannotReadScriptException 实例源码

项目:class-guard    文件:EmbeddedDatabaseBuilderTests.java   
@Test
public void testBuildNoSuchScript() {
    try {
        new EmbeddedDatabaseBuilder().addScript("bogus.sql").build();
        fail("Should have failed");
    }
    catch (DataAccessResourceFailureException ex) {
        assertTrue(ex.getCause() instanceof CannotReadScriptException);
    }
}
项目:spring4-understanding    文件:EmbeddedDatabaseBuilderTests.java   
@Test(expected = CannotReadScriptException.class)
public void addScriptWithBogusFileName() {
    new EmbeddedDatabaseBuilder().addScript("bogus.sql").build();
}