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 1717package  org .springframework .test .context .jdbc ;
1818
1919import  org .junit .jupiter .api .MethodOrderer ;
20+ import  org .junit .jupiter .api .Nested ;
2021import  org .junit .jupiter .api .Test ;
2122import  org .junit .jupiter .api .TestMethodOrder ;
2223
3132 */ 
3233@ SpringJUnitConfig (EmptyDatabaseConfig .class )
3334@ TestMethodOrder (MethodOrderer .MethodName .class )
34- @ Sql ({ "schema.sql" , "data.sql"  })
35+ @ Sql ({ "recreate- schema.sql" , "data.sql"  })
3536@ DirtiesContext 
3637class  TransactionalSqlScriptsTests  extends  AbstractTransactionalTests  {
3738
@@ -46,4 +47,20 @@ void methodLevelScripts() {
4647		assertNumUsers (2 );
4748	}
4849
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+ 
4966}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments