org.springframework.jdbc.datasource.init.ScriptStatementFailedException Java Examples
The following examples show how to use
org.springframework.jdbc.datasource.init.ScriptStatementFailedException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmbeddedDatabaseBuilderTests.java From spring-analysis-note with MIT License | 6 votes |
@Test public void createSameSchemaTwiceWithoutUniqueDbNames() throws Exception { EmbeddedDatabase db1 = new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); try { new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); fail("Should have thrown a ScriptStatementFailedException"); } catch (ScriptStatementFailedException e) { // expected } finally { db1.shutdown(); } }
Example #2
Source File: EmbeddedDatabaseBuilderTests.java From java-technology-stack with MIT License | 6 votes |
@Test public void createSameSchemaTwiceWithoutUniqueDbNames() throws Exception { EmbeddedDatabase db1 = new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); try { new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); fail("Should have thrown a ScriptStatementFailedException"); } catch (ScriptStatementFailedException e) { // expected } finally { db1.shutdown(); } }
Example #3
Source File: EmbeddedDatabaseBuilderTests.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Test public void createSameSchemaTwiceWithoutUniqueDbNames() throws Exception { EmbeddedDatabase db1 = new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); try { new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(getClass()))// .addScripts("db-schema-without-dropping.sql").build(); fail("Should have thrown a ScriptStatementFailedException"); } catch (ScriptStatementFailedException e) { // expected } finally { db1.shutdown(); } }