Document default scripts for embedded databases

The reference manual currently documents the wrong file name for the
default data SQL script used by EmbeddedDatabaseBuilder. In addition,
the testing chapter of the reference manual does not link to the testing
section of the JDBC chapter.

 - Updated the "Testing data access logic with an embedded database"
   section of the reference manual appropriately.
 - Added a new paragraph to the "JDBC Testing Support" section of the
   testing chapter which cross references the "Testing data access logic
   with an embedded database" section.

Issue: SPR-9467
This commit is contained in:
Sam Brannen
2012-06-19 20:48:07 +02:00
parent 5eae22abb8
commit 027e49c58a
4 changed files with 20 additions and 15 deletions

View File

@@ -2902,11 +2902,13 @@ SqlTypeValue value = new AbstractSqlTypeValue() {
<programlisting language="java">
public class DataAccessUnitTestTemplate {
private EmbeddedDatabase db;
@Before
public void setUp() {
// creates a HSQL in-memory db populated from default scripts classpath:schema.sql and classpath:test-data.sql
// creates an HSQL in-memory database populated from default scripts
// classpath:schema.sql and classpath:data.sql
db = new EmbeddedDatabaseBuilder().addDefaultScripts().build();
}
@@ -2920,8 +2922,8 @@ public class DataAccessUnitTestTemplate {
public void tearDown() {
db.shutdown();
}
}
</programlisting>
}</programlisting>
</section>
</section>

View File

@@ -416,6 +416,12 @@
<classname>AbstractTransactionalTestNGSpringContextTests</classname>
</link> provide convenience methods which delegate to
<classname>SimpleJdbcTestUtils</classname> internally.</emphasis></para>
<para>The <literal>spring-jdbc</literal> module provides support for
configuring and launching an embedded database which can be used in
integration tests that interact with a database. For details, see <xref
linkend="jdbc-embedded-database-support" /> and <xref
linkend="jdbc-embedded-database-dao-testing" />.</para>
</section>
<section id="integration-testing-annotations">