@Test public void testLiquibaseEndpoint() { this.context = new AnnotationConfigApplicationContext(); this.context.register(EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, EndpointAutoConfiguration.class); this.context.refresh(); LiquibaseEndpoint endpoint = this.context.getBean(LiquibaseEndpoint.class); assertThat(endpoint).isNotNull(); assertThat(endpoint.invoke()).hasSize(1); }
@Test public void testLiquibasePlusValidation() throws Exception { EnvironmentTestUtils.addEnvironment(this.context, "spring.datasource.initialize:false", "liquibase.changeLog:classpath:db/changelog/db.changelog-city.yaml", "spring.jpa.hibernate.ddl-auto:validate"); setupTestConfiguration(); this.context.register(LiquibaseAutoConfiguration.class); this.context.refresh(); }
@Test public void testLiquibaseEndpoint() { this.context = new AnnotationConfigApplicationContext(); this.context.register(EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, EndpointAutoConfiguration.class); this.context.refresh(); LiquibaseEndpoint endpoint = this.context.getBean(LiquibaseEndpoint.class); assertNotNull(endpoint); assertEquals(1, endpoint.invoke().size()); }
@Test public void liquibaseAutoConfigurationWasImported() { assertThat(this.applicationContext) .has(importedAutoConfiguration(LiquibaseAutoConfiguration.class)); }