All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.dbmigration.liquibase.test.LiquibaseConfigurationIT.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package {{packageName}}.wire.liquibase.infrastructure.secondary;

import static org.assertj.core.api.Assertions.assertThat;

import liquibase.integration.spring.SpringLiquibase;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import {{packageName}}.IntegrationTest;

@IntegrationTest
class LiquibaseConfigurationIT {

  @Nested
  @IntegrationTest(properties = { "application.liquibase.async=true" })
  class Async {

    @Autowired
    private ApplicationContext applicationContext;

    @Test
    void shouldGetLiquibaseAsync() {
      SpringLiquibase springLiquibase = (SpringLiquibase) applicationContext.getBean("liquibase");

      assertThat(springLiquibase).isNotNull();
    }
  }

  @Nested
  @IntegrationTest(properties = { "application.liquibase.async=false" })
  class Sync {

    @Autowired
    private ApplicationContext applicationContext;

    @Test
    void shouldGetLiquibaseSync() {
      SpringLiquibase springLiquibase = (SpringLiquibase) applicationContext.getBean("liquibase");

      assertThat(springLiquibase).isNotNull();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy