Fix the java code style issue.
[aai/esr-server.git] / esr-mgr / src / test / java / org / onap / aai / esr / ExtsysAppConfigurationTest.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.aai.esr;
17
18 import static org.junit.Assert.assertEquals;
19 import org.junit.Test;
20
21 public class ExtsysAppConfigurationTest {
22
23     @Test
24     public void getterAndSetter4template() {
25         final String template = "Hello ESR";
26         ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
27         appConfiguration.setTemplate(template);
28         assertEquals(appConfiguration.getTemplate(), template);
29     }
30
31     @Test
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);
37     }
38
39     @Test
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);
45     }
46
47     @Test
48     public void getterAndSetter4msbDiscoveryPort() {
49         final String msbDiscoveryPort = "10081";
50         ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
51         appConfiguration.setMsbDiscoveryPort(msbDiscoveryPort);
52         assertEquals(appConfiguration.getMsbDiscoveryPort(), msbDiscoveryPort);
53     }
54
55     @Test
56     public void getterAndSetter4registByHand() {
57         final String registByHand = "true";
58         ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
59         appConfiguration.setRegistByHand(registByHand);
60         assertEquals(appConfiguration.getRegistByHand(), registByHand);
61     }
62
63     @Test
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);
69     }
70
71     @Test
72     public void getterAndSetter4serviceIp() {
73         final String serviceIp = "true";
74         ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
75         appConfiguration.setServiceIp(serviceIp);
76         assertEquals(appConfiguration.getServiceIp(), serviceIp);
77     }
78 }