2 * Copyright 2017 ZTE Corporation.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.holmes.common.aai.config;
18 import static org.hamcrest.CoreMatchers.equalTo;
19 import static org.junit.Assert.*;
21 import org.junit.Test;
23 public class AaiConfigTest {
26 public void testAaiConfig_get_static_fields() {
27 String aaiVnfAddr = "/aai/v11/network/generic-vnfs/generic-vnf";
28 String aaiVmAddr = "/aai/v11/search/nodes-query?search-node-type=vserver&filter=";
29 String xTransactionId = "9999";
30 String xFromAppId = "jimmy-postman";
31 assertThat(aaiVnfAddr, equalTo(AaiConfig.AAI_VNF_ADDR));
32 assertThat(aaiVmAddr, equalTo(AaiConfig.AAI_VM_ADDR));
33 assertThat(xTransactionId, equalTo(AaiConfig.X_TRANSACTION_ID));
34 assertThat(xFromAppId, equalTo(AaiConfig.X_FROMAPP_ID));
38 public void testAaiConfig_getAuthenticationCredentials() {
39 String expect = "Basic QUFJOkFBSQ==";
40 assertThat(expect, equalTo(AaiConfig.getAuthenticationCredentials()));