007141f411a816304fa141a8c6cc8b4f8e5d8b6c
[policy/engine.git] / ONAP-REST / src / test / java / org / onap / policy / rest / adapter / YAMLParamsTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
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.rest.adapter;
21
22 import static org.junit.Assert.assertTrue;
23
24 import java.util.ArrayList;
25
26 import org.junit.Test;
27
28 public class YAMLParamsTest {
29         
30         @Test
31         public void testYAMLParams(){
32                 YAMLParams yamlParams = new YAMLParams();
33                 yamlParams.setActor("Test");
34                 assertTrue("Test".equals(yamlParams.getActor()));
35                 yamlParams.setRecipe("Test");
36                 assertTrue("Test".equals(yamlParams.getRecipe()));
37                 yamlParams.setClname("Test");
38                 assertTrue("Test".equals(yamlParams.getClname()));
39                 yamlParams.setGuardActiveEnd("Test");
40                 assertTrue("Test".equals(yamlParams.getGuardActiveEnd()));
41                 yamlParams.setGuardActiveStart("Test");
42                 assertTrue("Test".equals(yamlParams.getGuardActiveStart()));
43                 yamlParams.setLimit("Test");
44                 assertTrue("Test".equals(yamlParams.getLimit()));
45                 yamlParams.setBlackList(new ArrayList<>());
46                 assertTrue(yamlParams.getBlackList() != null);
47                 yamlParams.setTargets(new ArrayList<>());
48                 assertTrue(yamlParams.getTargets() != null);
49                 yamlParams.setTimeUnits("Test");
50                 assertTrue("Test".equals(yamlParams.getTimeUnits()));
51                 yamlParams.setTimeWindow("Test");
52                 assertTrue("Test".equals(yamlParams.getTimeWindow()));
53         }
54
55 }