|
|
|
@ -23,7 +23,6 @@ import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
|
|
|
|
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.couchbase.CouchbaseTestConfigurer;
|
|
|
|
|
import org.springframework.boot.autoconfigure.data.alt.couchbase.CityCouchbaseRepository;
|
|
|
|
|
import org.springframework.boot.autoconfigure.data.alt.couchbase.ReactiveCityCouchbaseRepository;
|
|
|
|
|
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
|
|
|
|
|
import org.springframework.boot.autoconfigure.data.couchbase.city.ReactiveCityRepository;
|
|
|
|
@ -32,7 +31,7 @@ import org.springframework.boot.test.util.TestPropertyValues;
|
|
|
|
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.context.annotation.Import;
|
|
|
|
|
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
|
|
|
|
|
import org.springframework.data.couchbase.repository.config.EnableReactiveCouchbaseRepositories;
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
@ -82,7 +81,7 @@ public class CouchbaseReactiveRepositoriesAutoConfigurationTests {
|
|
|
|
|
public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() {
|
|
|
|
|
load(CustomizedConfiguration.class);
|
|
|
|
|
assertThat(this.context.getBeansOfType(ReactiveCityCouchbaseRepository.class))
|
|
|
|
|
.isEmpty();
|
|
|
|
|
.isNotNull();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void load(Class<?> config, String... environment) {
|
|
|
|
@ -116,7 +115,8 @@ public class CouchbaseReactiveRepositoriesAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
|
@TestAutoConfigurationPackage(CouchbaseReactiveRepositoriesAutoConfigurationTests.class)
|
|
|
|
|
@EnableMongoRepositories(basePackageClasses = CityCouchbaseRepository.class)
|
|
|
|
|
@EnableReactiveCouchbaseRepositories(basePackageClasses = ReactiveCityCouchbaseRepository.class)
|
|
|
|
|
@Import(CouchbaseTestConfigurer.class)
|
|
|
|
|
protected static class CustomizedConfiguration {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|