Fixed the AAI API Version for VoLTE
[holmes/common.git] / holmes-actions / src / test / java / org / onap / holmes / common / aai / config / AaiConfigTest.java
1 /**
2  * Copyright 2017 ZTE Corporation.
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 package org.onap.holmes.common.aai.config;
17
18 import static org.hamcrest.CoreMatchers.equalTo;
19 import static org.junit.Assert.*;
20
21 import org.junit.Test;
22
23 public class AaiConfigTest {
24
25     @Test
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.AaiConsts.AAI_VNF_ADDR));
32         assertThat(aaiVmAddr, equalTo(AaiConfig.AaiConsts.AAI_VM_ADDR));
33         assertThat(xTransactionId, equalTo(AaiConfig.X_TRANSACTION_ID));
34         assertThat(xFromAppId, equalTo(AaiConfig.X_FROMAPP_ID));
35     }
36
37     @Test
38     public void testAaiConfig_getAuthenticationCredentials() {
39         String expect = "Basic QUFJOkFBSQ==";
40         assertThat(expect, equalTo(AaiConfig.getAuthenticationCredentials()));
41     }
42 }