@ -179,12 +179,11 @@ script, depending on where `@Sql` is declared. If a default cannot be detected,
@@ -179,12 +179,11 @@ script, depending on where `@Sql` is declared. If a default cannot be detected,
If you need to configure multiple sets of SQL scripts for a given test class or test
method but with different syntax configuration, different error handling rules, or
different execution phases per set, you can declare multiple instances of `@Sql`. With
Java 8, you can use `@Sql` as a repeatable annotation. Otherwise, you can use the
`@SqlGroup` annotation as an explicit container for declaring multiple instances of
`@Sql`.
different execution phases per set, you can declare multiple instances of `@Sql`. You can
either use `@Sql` as a repeatable annotation, or you can use the `@SqlGroup` annotation
as an explicit container for declaring multiple instances of `@Sql`.
The following example shows how to use `@Sql` as a repeatable annotation with Java 8:
The following example shows how to use `@Sql` as a repeatable annotation:
// run code that uses the test schema and test data
}
----
======
@ -212,9 +216,8 @@ In the scenario presented in the preceding example, the `test-schema.sql` script
@@ -212,9 +216,8 @@ In the scenario presented in the preceding example, the `test-schema.sql` script
different syntax for single-line comments.
The following example is identical to the preceding example, except that the `@Sql`
declarations are grouped together within `@SqlGroup`. With Java 8 and above, the use of
`@SqlGroup` is optional, but you may need to use `@SqlGroup` for compatibility with
other JVM languages such as Kotlin.
declarations are grouped together within `@SqlGroup`. The use of `@SqlGroup` is optional,
but you may need to use `@SqlGroup` for compatibility with other JVM languages.