File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
spring-test/src/test/java/org/springframework/test/context/jdbc Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 17
17
package org .springframework .test .context .jdbc ;
18
18
19
19
import org .junit .jupiter .api .MethodOrderer ;
20
+ import org .junit .jupiter .api .Nested ;
20
21
import org .junit .jupiter .api .Test ;
21
22
import org .junit .jupiter .api .TestMethodOrder ;
22
23
31
32
*/
32
33
@ SpringJUnitConfig (EmptyDatabaseConfig .class )
33
34
@ TestMethodOrder (MethodOrderer .MethodName .class )
34
- @ Sql ({ "schema.sql" , "data.sql" })
35
+ @ Sql ({ "recreate- schema.sql" , "data.sql" })
35
36
@ DirtiesContext
36
37
class TransactionalSqlScriptsTests extends AbstractTransactionalTests {
37
38
@@ -46,4 +47,20 @@ void methodLevelScripts() {
46
47
assertNumUsers (2 );
47
48
}
48
49
50
+ @ Nested
51
+ class NestedTransactionalSqlScriptsTests {
52
+
53
+ @ Test
54
+ void classLevelScripts () {
55
+ assertNumUsers (1 );
56
+ }
57
+
58
+ @ Test
59
+ @ Sql ({ "recreate-schema.sql" , "data.sql" , "data-add-dogbert.sql" })
60
+ void methodLevelScripts () {
61
+ assertNumUsers (2 );
62
+ }
63
+
64
+ }
65
+
49
66
}
You can’t perform that action at this time.
0 commit comments