@Test public void testBuildNoSuchScript() { try { new EmbeddedDatabaseBuilder().addScript("bogus.sql").build(); fail("Should have failed"); } catch (DataAccessResourceFailureException ex) { assertTrue(ex.getCause() instanceof CannotReadScriptException); } }
@Test(expected = CannotReadScriptException.class) public void addScriptWithBogusFileName() { new EmbeddedDatabaseBuilder().addScript("bogus.sql").build(); }