Improve code coverage for aaf cadi modules
[aaf/cadi.git] / core / src / test / java / org / onap / aaf / cadi / util / JU_Vars.java
1 /*******************************************************************************\r
2  * * org.onap.aaf\r
3  * * ===========================================================================\r
4  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
5  * * ===========================================================================\r
6  * * Licensed under the Apache License, Version 2.0 (the "License");\r
7  * * you may not use this file except in compliance with the License.\r
8  * * You may obtain a copy of the License at\r
9  * * \r
10  *  *      http://www.apache.org/licenses/LICENSE-2.0\r
11  * * \r
12  *  * Unless required by applicable law or agreed to in writing, software\r
13  * * distributed under the License is distributed on an "AS IS" BASIS,\r
14  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15  * * See the License for the specific language governing permissions and\r
16  * * limitations under the License.\r
17  * * ============LICENSE_END====================================================\r
18  * *\r
19  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
20  * *\r
21  ******************************************************************************/\r
22 package org.onap.aaf.cadi.util;\r
23 \r
24 import static org.junit.Assert.assertEquals;\r
25 \r
26 import java.util.ArrayList;\r
27 import java.util.List;\r
28 \r
29 import org.junit.Test;\r
30 \r
31 public class JU_Vars {\r
32 \r
33         @Test\r
34         public void convert() {\r
35                 String test = "test";\r
36                 List<String> list = new ArrayList<String>();\r
37                 list.add("method");\r
38                 assertEquals(Vars.convert(test, list), test);\r
39         }\r
40 \r
41         @Test\r
42         public void convertTest1() {\r
43                 String test = "te%t";\r
44                 List<String> list = new ArrayList<String>();\r
45                 list.add("method");\r
46                 assertEquals(Vars.convert("test", list), "test");\r
47         }\r
48 \r
49         @Test\r
50         public void convertTest2() {\r
51                 String test = "te%s%t";\r
52                 List<String> list = new ArrayList<String>();\r
53                 list.add("method");\r
54                 assertEquals(Vars.convert("test", list), "test");\r
55         }\r
56 \r
57 }\r