Adding interfaces in documentation
[aai/sparky-be.git] / sparkybe-onap-service / src / test / java / org / onap / aai / sparky / dal / ElasticSearchAdapterTest.java
1 package org.onap.aai.sparky.dal;
2
3 import static org.junit.Assert.assertNotNull;
4
5 import javax.ws.rs.core.MediaType;
6
7 import org.junit.Before;
8 import org.junit.Test;
9 import org.onap.aai.restclient.enums.RestAuthenticationMode;
10 import org.onap.aai.sparky.dal.rest.config.RestEndpointConfig;
11 import org.onap.aai.sparky.dal.ElasticSearchAdapter;
12
13 public class ElasticSearchAdapterTest {
14         
15
16         private ElasticSearchAdapter elasticSearchAdapter;
17         private RestEndpointConfig  endpointConfig; 
18         
19         @Before
20           public void init() throws Exception {
21                 
22                 endpointConfig = new RestEndpointConfig(); 
23                 endpointConfig.setRestAuthenticationMode(RestAuthenticationMode.SSL_BASIC);
24                 elasticSearchAdapter = new ElasticSearchAdapter(endpointConfig);
25           }
26         
27         
28         @Test 
29         public void updateValues() {
30                 
31                 assertNotNull(elasticSearchAdapter.doPost("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
32                 assertNotNull(elasticSearchAdapter.doGet("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
33                 assertNotNull(elasticSearchAdapter.doHead("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
34                 assertNotNull(elasticSearchAdapter.doPut("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
35                 assertNotNull(elasticSearchAdapter.doPatch("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
36                 assertNotNull(elasticSearchAdapter.doDelete("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
37                 assertNotNull(elasticSearchAdapter.doBulkOperation("https://10.247.40.25:8000","{maxResults:10, queryStr: f}"));
38                 assertNotNull(elasticSearchAdapter.buildBulkImportOperationRequest("","","","",""));
39                 assertNotNull(elasticSearchAdapter.retrieveEntityById("","","","",""));
40                 assertNotNull(elasticSearchAdapter.buildElasticSearchUrlForApi("",""));
41                 assertNotNull(elasticSearchAdapter.buildElasticSearchUrl("",""));
42                 assertNotNull(elasticSearchAdapter.buildElasticSearchGetDocUrl("","",""));
43                 assertNotNull(elasticSearchAdapter.buildElasticSearchGetDocUrl("",""));
44                 assertNotNull(elasticSearchAdapter.buildElasticSearchPostUrl(""));
45                 assertNotNull(elasticSearchAdapter.getBulkUrl());
46
47         }
48
49
50 }