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.aai.esr;
18 import static org.junit.Assert.assertEquals;
19 import org.junit.Test;
21 public class ExtsysAppConfigurationTest {
24 public void getterAndSetter4template() {
25 final String template = "Hello ESR";
26 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
27 appConfiguration.setTemplate(template);
28 assertEquals(appConfiguration.getTemplate(), template);
32 public void getterAndSetter4defaultName() {
33 final String defaultName = "ONAP-A&AI-ESR";
34 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
35 appConfiguration.setDefaultName(defaultName);
36 assertEquals(appConfiguration.getDefaultName(), defaultName);
40 public void getterAndSetter4msbDiscoveryIp() {
41 final String msbDiscoveryIp = "127.0.0.1";
42 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
43 appConfiguration.setMsbDiscoveryIp(msbDiscoveryIp);
44 assertEquals(appConfiguration.getMsbDiscoveryIp(), msbDiscoveryIp);
48 public void getterAndSetter4msbDiscoveryPort() {
49 final String msbDiscoveryPort = "10081";
50 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
51 appConfiguration.setMsbDiscoveryPort(msbDiscoveryPort);
52 assertEquals(appConfiguration.getMsbDiscoveryPort(), msbDiscoveryPort);
56 public void getterAndSetter4registByHand() {
57 final String registByHand = "true";
58 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
59 appConfiguration.setRegistByHand(registByHand);
60 assertEquals(appConfiguration.getRegistByHand(), registByHand);
64 public void getterAndSetter4msbServerAddr() {
65 final String msbServerAddr = "http://127.0.0.1:80";
66 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
67 appConfiguration.setMsbServerAddr(msbServerAddr);
68 assertEquals(appConfiguration.getMsbServerAddr(), msbServerAddr);
72 public void getterAndSetter4serviceIp() {
73 final String serviceIp = "true";
74 ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
75 appConfiguration.setServiceIp(serviceIp);
76 assertEquals(appConfiguration.getServiceIp(), serviceIp);