@Test public void testDefaultRepositoryConfiguration() throws Exception { this.context = new AnnotationConfigApplicationContext(); addElasticsearchProperties(this.context); this.context.register(TestConfiguration.class, ElasticsearchAutoConfiguration.class, ElasticsearchRepositoriesAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); this.context.refresh(); assertThat(this.context.getBean(CityRepository.class)).isNotNull(); assertThat(this.context.getBean(Client.class)).isNotNull(); }
@Test public void testDefaultRepositoryConfiguration() throws Exception { this.context = new AnnotationConfigApplicationContext(); addElasticsearchProperties(this.context); this.context.register(TestConfiguration.class, ElasticsearchAutoConfiguration.class, ElasticsearchRepositoriesAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); this.context.refresh(); assertNotNull(this.context.getBean(CityRepository.class)); assertNotNull(this.context.getBean(Client.class)); }