File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
src/test/java/org/springframework/data/elasticsearch/config Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 24
24
import org .apache .commons .lang .ClassUtils ;
25
25
import org .elasticsearch .client .RestHighLevelClient ;
26
26
import org .junit .Test ;
27
+
27
28
import org .springframework .context .annotation .AnnotationConfigApplicationContext ;
28
29
import org .springframework .context .annotation .Bean ;
29
30
import org .springframework .context .annotation .Configuration ;
39
40
import org .springframework .data .elasticsearch .core .mapping .SimpleElasticsearchMappingContext ;
40
41
41
42
/**
43
+ * Unit tests for {@link ElasticsearchConfigurationSupport}.
44
+ *
42
45
* @author Christoph Strobl
46
+ * @author Peter-Josef Meisch
43
47
*/
44
48
public class ElasticsearchConfigurationSupportUnitTests {
45
49
@@ -86,16 +90,11 @@ public void restConfigContainsElasticsearchTemplate() {
86
90
}
87
91
88
92
@ Test // DATAES-563
89
- public void restConfigContainsElasticsearchOperationsByName () {
93
+ public void restConfigContainsElasticsearchOperationsByNameAndAlias () {
90
94
91
95
AbstractApplicationContext context = new AnnotationConfigApplicationContext (RestConfig .class );
92
- assertThat (context .getBean ("elasticsearchOperations" )).isNotNull ();
93
- }
94
96
95
- @ Test // DATAES-563
96
- public void restConfigContainsElasticsearchTemplateByName () {
97
-
98
- AbstractApplicationContext context = new AnnotationConfigApplicationContext (RestConfig .class );
97
+ assertThat (context .getBean ("elasticsearchOperations" )).isNotNull ();
99
98
assertThat (context .getBean ("elasticsearchTemplate" )).isNotNull ();
100
99
}
101
100
Original file line number Diff line number Diff line change 22
22
import org .elasticsearch .client .RestHighLevelClient ;
23
23
import org .junit .Test ;
24
24
import org .junit .runner .RunWith ;
25
+
25
26
import org .springframework .beans .factory .annotation .Autowired ;
26
27
import org .springframework .context .annotation .Configuration ;
27
28
import org .springframework .data .elasticsearch .repositories .existing .index .CreateIndexFalseRepository ;
30
31
import org .springframework .test .context .junit4 .SpringJUnit4ClassRunner ;
31
32
32
33
/**
34
+ * Tests for {@link AbstractElasticsearchConfiguration}.
35
+ *
33
36
* @author Peter-Josef Meisch
34
37
*/
35
38
@ RunWith (SpringJUnit4ClassRunner .class )
You can’t perform that action at this time.
0 commit comments