2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017-2018 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.aai.sparky.search.filters.entity;
24 import static org.junit.Assert.assertNotNull;
25 import static org.junit.Assert.assertNull;
27 import org.junit.Before;
28 import org.junit.Test;
29 import org.onap.aai.sparky.search.filters.config.UiFilterConfig;
32 public class UiFilterEntityTest {
34 private UiFilterEntity uiFilterEntity, uiFilterEntity2;
35 private UiFilterConfig filterConfig;
40 public void init() throws Exception {
42 filterConfig = new UiFilterConfig("1", "Prov-Status", "Prov-Status", "DropDown", "false",
43 "Any Prov Status", null, "options", null, null);
44 uiFilterEntity = new UiFilterEntity();
45 uiFilterEntity2 = new UiFilterEntity(filterConfig);
50 public void updateValues() {
52 uiFilterEntity.setOptionsValues(null);
53 assertNull(uiFilterEntity.getOptionsValues());
54 uiFilterEntity.setDefaultValue(null);
55 assertNull(uiFilterEntity.getDefaultValue());
56 uiFilterEntity.setFilterValueList(null);
57 assertNull(uiFilterEntity.getFilterValueList());
58 uiFilterEntity.setFilterId("1");
59 assertNotNull(uiFilterEntity.getFilterId());
60 uiFilterEntity.setFilterName("Prov-Status");
61 assertNotNull(uiFilterEntity.getFilterName());
62 uiFilterEntity.setDisplayName("Prov-Status");
63 assertNotNull(uiFilterEntity.getDisplayName());
64 uiFilterEntity.setDataType("DropDown");
65 assertNotNull(uiFilterEntity.getDataType());
66 uiFilterEntity.setMultiSelect("false");
67 assertNotNull(uiFilterEntity.getMultiSelect());
68 uiFilterEntity.setWatermark("Any Prov Status");
69 assertNotNull(uiFilterEntity.getWatermark());
70 uiFilterEntity.setOptionsType("options");
71 assertNotNull(uiFilterEntity.getOptionsType());