@Test public void testFlywayEndpoint() { this.context = new AnnotationConfigApplicationContext(); this.context.register(EmbeddedDataSourceConfiguration.class, FlywayAutoConfiguration.class, EndpointAutoConfiguration.class); this.context.refresh(); FlywayEndpoint endpoint = this.context.getBean(FlywayEndpoint.class); assertThat(endpoint).isNotNull(); assertThat(endpoint.invoke()).hasSize(1); }
@Test public void testFlywayPlusValidation() throws Exception { EnvironmentTestUtils.addEnvironment(this.context, "spring.datasource.initialize:false", "flyway.locations:classpath:db/city", "spring.jpa.hibernate.ddl-auto:validate"); setupTestConfiguration(); this.context.register(FlywayAutoConfiguration.class); this.context.refresh(); }
@Test public void testFlywayEndpoint() { this.context = new AnnotationConfigApplicationContext(); this.context.register(EmbeddedDataSourceConfiguration.class, FlywayAutoConfiguration.class, EndpointAutoConfiguration.class); this.context.refresh(); FlywayEndpoint endpoint = this.context.getBean(FlywayEndpoint.class); assertNotNull(endpoint); assertEquals(1, endpoint.invoke().size()); }
@Test public void flywayAutoConfigurationWasImported() { assertThat(this.applicationContext) .has(importedAutoConfiguration(FlywayAutoConfiguration.class)); }