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.
17 package org.onap.holmes.common.api.entity;
20 import org.junit.After;
21 import org.junit.Before;
22 import org.junit.Test;
24 import static org.hamcrest.core.IsEqual.equalTo;
25 import static org.junit.Assert.assertThat;
27 public class ServiceNode4QueryTest {
28 private ServiceNode4Query serviceNode4Query;
31 public void before()throws Exception{
32 serviceNode4Query = new ServiceNode4Query();
35 public void after()throws Exception{}
38 public void getterAndSetter4Ip() throws Exception{
39 final String ip = "ip";
40 serviceNode4Query.setIp(ip);
41 assertThat(serviceNode4Query.getIp(), equalTo(ip));
45 public void getterAndSetter4Port() throws Exception{
46 final String port = "port";
47 serviceNode4Query.setPort(port);
48 assertThat(serviceNode4Query.getPort(), equalTo(port));
52 public void getterAndSetter4CheckType() throws Exception{
53 final String checkType = "checkType";
54 serviceNode4Query.setCheckType(checkType);
55 assertThat(serviceNode4Query.getCheckType(), equalTo(checkType));
59 public void getterAndSetter4checkUrl() throws Exception{
60 final String checkUrl = "checkUrl";
61 serviceNode4Query.setCheckUrl(checkUrl);
62 assertThat(serviceNode4Query.getCheckUrl(), equalTo(checkUrl));
66 public void getterAndSetter4hHa_role() throws Exception{
67 final String ha_role = "ha_role";
68 serviceNode4Query.setHa_role(ha_role);
69 assertThat(serviceNode4Query.getHa_role(), equalTo(ha_role));
73 public void getterAndSetter4NodeId() throws Exception{
74 final String nodeId = "nodeId";
75 serviceNode4Query.setNodeId(nodeId);
76 assertThat(serviceNode4Query.getNodeId(), equalTo(nodeId));
80 public void getterAndSetter4Status() throws Exception{
81 final String status = "status";
82 serviceNode4Query.setStatus(status);
83 assertThat(serviceNode4Query.getStatus(), equalTo(status));