Removing AJSC and moving to SpringBoot
[aai/search-data-service.git] / src / test / java / org / onap / aai / sa / searchdbabstraction / elasticsearch / dao / ElasticSearchHttpControllerTest.java
index ddaf7da..e68534c 100644 (file)
@@ -22,13 +22,11 @@ package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao;
 
 import org.json.JSONException;
 import org.json.JSONObject;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.onap.aai.sa.searchdbabstraction.elasticsearch.config.ElasticSearchConfig;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreDataEntity;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreDataEntityImpl;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
 import org.onap.aai.sa.searchdbabstraction.entity.OperationResult;
 
 import java.util.Properties;
@@ -47,6 +45,7 @@ public class ElasticSearchHttpControllerTest {
     Properties properties = new Properties();
     properties.put(ElasticSearchConfig.ES_IP_ADDRESS, "127.0.0.1");
     properties.put(ElasticSearchConfig.ES_HTTP_PORT, "9200");
+//    ElasticSearchConfig config = new ElasticSearchConfig(properties);
     ElasticSearchConfig config = new ElasticSearchConfig(properties);
     elasticSearch = new ElasticSearchHttpController(config);
 
@@ -59,13 +58,18 @@ public class ElasticSearchHttpControllerTest {
     testDocument.setSearchTags("service-instance-id");
 
   }
-
+//
   @Test
   public void testCreateTable() throws Exception {
     OperationResult result = elasticSearch.createTable("test", "aai-entities", indexSettings, indexMappings);
     System.out.println(result);
   }
 
+  @Test
+  public void testsuggestionQueryWithPayload() throws Exception {
+    Assert.assertNotNull(elasticSearch.suggestionQueryWithPayload("autoSuggest", "suggest-index"));
+  }
+//
   @Test
   public void testCreateDocument() throws Exception {
     OperationResult result = elasticSearch.createDocument("test", testDocument, false);
@@ -150,7 +154,7 @@ public class ElasticSearchHttpControllerTest {
     OperationResult result = elasticSearch.deleteIndex("test");
     System.out.println(result);
   }
-
+//
   class AAIEntityTestObject implements DocumentStoreDataEntity {
     private String id;
     private String entityType;