2 * Copyright 2018 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.sfc.entity;
18 import org.junit.Before;
19 import org.junit.Test;
21 import static org.junit.Assert.*;
23 public class FlowClassfierReq4NTest {
24 FlowClassfierReq4N flowClassfierReq4N;
27 public void setUp() throws Exception {
28 flowClassfierReq4N = new FlowClassfierReq4N();
32 public void getAndSetUrl() throws Exception {
33 String url = "http://0.0.0.0:8080";
34 flowClassfierReq4N.setUrl(url);
35 assert flowClassfierReq4N.getUrl().equals(url);
39 public void getAndSetSdnControllerId() throws Exception {
40 String sdnControllerId = "123-456-789";
41 flowClassfierReq4N.setSdnControllerId(sdnControllerId);
42 assert flowClassfierReq4N.getSdnControllerId().equals(sdnControllerId);
46 public void getAndSetName() throws Exception {
48 flowClassfierReq4N.setName(name);
49 assert flowClassfierReq4N.getName().equals(name);
53 public void getAndSetDescription() throws Exception {
54 String description = "description";
55 flowClassfierReq4N.setDescription(description);
56 assert flowClassfierReq4N.getDescription().equals(description);
60 public void getAndSetDscp() throws Exception {
62 flowClassfierReq4N.setDscp(dscp);
63 assert flowClassfierReq4N.getDscp() == dscp;
67 public void getAndSetIp_proto() throws Exception {
68 String ip_proto = "ISIS";
69 flowClassfierReq4N.setIp_proto(ip_proto);
70 assert flowClassfierReq4N.getIp_proto().equals(ip_proto);
74 public void getAndSetSource_port_range() throws Exception {
75 String source_port_range = "1-400";
76 flowClassfierReq4N.setSource_port_range(source_port_range);
77 assert flowClassfierReq4N.getSource_port_range().equals(source_port_range);
81 public void getAndSetDest_port_range() throws Exception {
82 String dest_port_range = "1-400";
83 flowClassfierReq4N.setDest_port_range(dest_port_range);
84 assert flowClassfierReq4N.getDest_port_range().equals(dest_port_range);
88 public void getAndSetSource_ip_range() throws Exception {
89 String source_ip_range = "0.0.0.0-1.1.1.1";
90 flowClassfierReq4N.setSource_ip_range(source_ip_range);
91 assert flowClassfierReq4N.getSource_ip_range().equals(source_ip_range);
95 public void getAndSetDest_ip_range() throws Exception {
96 String dest_ip_range = "0.0.0.0-1.1.1.1";
97 flowClassfierReq4N.setDest_ip_range(dest_ip_range);
98 assert flowClassfierReq4N.getDest_ip_range().equals(dest_ip_range);