839af2fdc41ce42246601e1590efe919b1f4d274
[policy/engine.git] / ONAP-PAP-REST / src / test / java / org / onap / policy / pap / xacml / rest / adapters / SearchDataTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-PAP-REST
4  * ================================================================================
5  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.policy.pap.xacml.rest.adapters;
21
22 import static org.junit.Assert.*;
23
24 import org.junit.Test;
25
26 public class SearchDataTest {
27         
28         
29         @Test
30         public void testSearchData(){
31                 String data = "Test";
32                 SearchData searchData = new SearchData();
33                 searchData.setQuery(data);
34                 searchData.setPolicyType(data);
35                 searchData.setOnapName(data);
36                 searchData.setDescriptiveScope(data);
37                 searchData.setClosedLooppolicyType(data);
38                 searchData.setD2Service(data);
39                 searchData.setVnfType(data);
40                 searchData.setPolicyStatus(data);
41                 searchData.setVproAction(data);
42                 searchData.setServiceType(data);
43                 searchData.setBindTextSearch(data);
44                 assertEquals(data, searchData.getQuery());
45                 assertEquals(data, searchData.getPolicyType());
46                 assertEquals(data, searchData.getDescriptiveScope());
47                 assertEquals(data, searchData.getClosedLooppolicyType());
48                 assertEquals(data, searchData.getOnapName());
49                 assertEquals(data, searchData.getD2Service());
50                 assertEquals(data, searchData.getVnfType());
51                 assertEquals(data, searchData.getPolicyStatus());
52                 assertEquals(data, searchData.getVproAction());
53                 assertEquals(data, searchData.getServiceType());
54                 assertEquals(data, searchData.getBindTextSearch());
55         }
56 }