29 lines
652 B
Java
29 lines
652 B
Java
package com.gzzn.omms.msgexchangeapi.elasticsearch;
|
|||
|
|
|
||
|
|
import org.junit.Test;
|
||
|
|
import org.junit.runner.RunWith;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
||
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
||
|
|
|
||
|
|
@RunWith(SpringRunner.class)
|
||
|
|
@SpringBootTest
|
||
|
|
public class ElasticsearchUtilTest {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private ElasticsearchUtil elasticsearchUtil;
|
||
|
|
|
||
|
|
@Test
|
||
|
|
public void testCreateIndex()
|
||
|
|
{
|
||
|
|
elasticsearchUtil.createIndex("testindex");
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
@Test
|
||
|
|
public void testDeleteIndex()
|
||
|
|
{
|
||
|
|
elasticsearchUtil.deleteIndex("testindex");
|
||
|
|
}
|
||
|
|
}
|