@ -344,7 +344,7 @@ class FlywayAutoConfigurationTests {
@@ -344,7 +344,7 @@ class FlywayAutoConfigurationTests {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) )
. containsExactly ( new Location ( "classpath:db/migration" ) ) ;
. containsExactly ( create Location( "classpath:db/migration" ) ) ;
} ) ;
}
@ -355,8 +355,8 @@ class FlywayAutoConfigurationTests {
@@ -355,8 +355,8 @@ class FlywayAutoConfigurationTests {
. run ( ( context ) - > {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) )
. containsExactly ( new Location ( "classpath:db/changelog" ) , new Location ( "classpath:db/migration" ) ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) ) . containsExactly (
create Location ( "classpath:db/changelog" ) , create Location( "classpath:db/migration" ) ) ;
} ) ;
}
@ -368,8 +368,8 @@ class FlywayAutoConfigurationTests {
@@ -368,8 +368,8 @@ class FlywayAutoConfigurationTests {
. run ( ( context ) - > {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) )
. containsExactly ( new Location ( "classpath:db/changelog" ) , new Location ( "classpath:db/migration" ) ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) ) . containsExactly (
create Location ( "classpath:db/changelog" ) , create Location( "classpath:db/migration" ) ) ;
} ) ;
}
@ -546,7 +546,7 @@ class FlywayAutoConfigurationTests {
@@ -546,7 +546,7 @@ class FlywayAutoConfigurationTests {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) ) . containsExactlyInAnyOrder (
new Location ( "classpath:db/vendors/h2" ) , new Location ( "classpath:db/changelog" ) ) ;
create Location( "classpath:db/vendors/h2" ) , create Location( "classpath:db/changelog" ) ) ;
} ) ;
}
@ -559,7 +559,7 @@ class FlywayAutoConfigurationTests {
@@ -559,7 +559,7 @@ class FlywayAutoConfigurationTests {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getLocations ( ) )
. containsExactly ( new Location ( "classpath:db/vendors/h2" ) ) ;
. containsExactly ( create Location( "classpath:db/vendors/h2" ) ) ;
} ) ;
}
@ -572,7 +572,7 @@ class FlywayAutoConfigurationTests {
@@ -572,7 +572,7 @@ class FlywayAutoConfigurationTests {
assertThat ( context ) . hasSingleBean ( Flyway . class ) ;
Flyway flyway = context . getBean ( Flyway . class ) ;
assertThat ( flyway . getConfiguration ( ) . getCallbackLocations ( ) )
. containsExactly ( new Location ( "classpath:com.example.h2" ) ) ;
. containsExactly ( create Location( "classpath:com.example.h2" ) ) ;
} ) ;
}
@ -938,6 +938,11 @@ class FlywayAutoConfigurationTests {
@@ -938,6 +938,11 @@ class FlywayAutoConfigurationTests {
} ;
}
@SuppressWarnings ( "deprecation" )
private static Location createLocation ( String location ) {
return new Location ( location ) ;
}
private static Map < String , ? > configureJpaProperties ( ) {
Map < String , Object > properties = new HashMap < > ( ) ;
properties . put ( "configured" , "manually" ) ;