Adjust sparky parent pom
[aai/sparky-be.git] / sparkybe-onap-service / src / test / java / org / onap / aai / sparky / dal / GizmoAdapterTest.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 //package org.onap.aai.sparky.dal;
23 //
24 //import static org.junit.Assert.assertNotNull;
25 //import static org.junit.Assert.assertNull;
26 //
27 //import org.junit.Before;
28 //import org.junit.Test;
29 //import org.onap.aai.nodes.NodeIngestor;
30 //import org.onap.aai.restclient.enums.RestAuthenticationMode;
31 //import org.onap.aai.setup.Version;
32 //import org.onap.aai.sparky.config.oxm.OxmModelLoader;
33 //import org.onap.aai.sparky.dal.rest.config.RestEndpointConfig;
34 //import org.springframework.test.context.ContextConfiguration;
35 //
36 //
37 //
38 //@ContextConfiguration(locations = { "classpath:oxm-reader/test-service-beans.xml" })
39 //public class GizmoAdapterTest {
40 //
41 //  private OxmModelLoader oxmModelLoader;
42 //  private RestEndpointConfig endpointConfig;
43 //  private GizmoAdapter gizmoAdapter;
44 //
45 //  private Version version;
46 //  
47 //  @Before
48 //  public void init() throws Exception {
49 //
50 //    
51 //    
52 //    version = Version.V11;
53 //    oxmModelLoader = new OxmModelLoader(version,null,null);
54 //    endpointConfig = new RestEndpointConfig();
55 //    endpointConfig.setRestAuthenticationMode(RestAuthenticationMode.SSL_BASIC);
56 //    endpointConfig.setEndpointIpAddress("10.147.110.199");
57 //    endpointConfig.setEndpointServerPort("9885");
58 //    endpointConfig.setBasicAuthUserName("sparky");
59 //    endpointConfig.setBasicAuthPassword("sparky");
60 //    gizmoAdapter = new GizmoAdapter(oxmModelLoader, endpointConfig);
61 //  }
62 //
63 //
64 //  @SuppressWarnings("static-access")
65 //  @Test
66 //  public void updateValues() throws Exception {
67 //
68 //    assertNotNull(gizmoAdapter.getMessageHeaders());
69 //    assertNotNull(gizmoAdapter.getBasicAuthenticationCredentials());
70 //    gizmoAdapter.setRelationshipsBasePath("/services/inventory/relationships/v10/");
71 //    assertNotNull(gizmoAdapter.getRelationshipsBasePath());
72 //    gizmoAdapter.setInventoryBasePath("/services/inventory/v10/");
73 //    assertNotNull(gizmoAdapter.getInventoryBasePath());
74 //    assertNotNull(gizmoAdapter.extractResourcePath("/services/inventory/v10/"));
75 //    assertNotNull(gizmoAdapter.getFullInventoryUrl("/services/inventory/v10/"));
76 //    assertNotNull(gizmoAdapter.addServerDetailsToUrl("/services/inventory/v10/"));
77 //    assertNotNull(gizmoAdapter.getFullRelationshipUrl(
78 //        "https://server.proxy:8443/aai/v11/business/customers/customer/customer-4"));
79 //    assertNotNull(gizmoAdapter.getBasicAuthenticationCredentials());
80 //    assertNotNull(gizmoAdapter.repairRelationshipSelfLink(
81 //        "https://server.proxy:8443/aai/v11/business/customers/", "PrimaryKeyValue"));
82 //    assertNotNull(gizmoAdapter.repairInventorySelfLink(
83 //        "https://server.proxy:8443/aai/v11/business/customers/", "PrimaryKeyValue"));
84 //    assertNotNull(gizmoAdapter.queryGizmo("https://server.proxy:8443/aai/v11/business/customers/",
85 //        "application/json"));
86 //    assertNotNull(gizmoAdapter.queryGizmoWithRetries(
87 //        "https://server.proxy:8443/aai/v11/business/customers/", "application/json", 4));
88 //    assertNull(gizmoAdapter.getSelfLinksByEntityType("vserver"));
89 //    gizmoAdapter.setEndpointConfig(endpointConfig);
90 //    assertNotNull(gizmoAdapter.getEndpointConfig());
91 //  }
92 //}