X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fsa%2Fsearchdbabstraction%2Felasticsearch%2Fdao%2FElasticSearchHttpControllerTest.java;h=e68534c972a114f8824db7be9847b42fc5908533;hb=ce701746049abfd94a87b46e43f296faf32d6213;hp=787976b0907f7b596cfc33e927379549e2f34e8f;hpb=22c477621c40c4762cceb67a1d18749bff68fb87;p=aai%2Fsearch-data-service.git diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchHttpControllerTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchHttpControllerTest.java index 787976b..e68534c 100644 --- a/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchHttpControllerTest.java +++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/ElasticSearchHttpControllerTest.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017 Amdocs + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,20 +17,16 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ 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; @@ -49,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); @@ -61,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); @@ -152,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;