update the package name
[dmaap/messagerouter/messageservice.git] / src / test / java / org / onap / dmaap / filemonitor / ServicePropertyServiceTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017 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
21  package org.onap.dmaap.filemonitor;
22
23 import static org.junit.Assert.*;
24
25 import java.io.File;
26
27 import org.junit.After;
28 import org.junit.Before;
29 import org.junit.Test;
30
31 public class ServicePropertyServiceTest {
32
33         @Before
34         public void setUp() throws Exception {
35         }
36
37         @After
38         public void tearDown() throws Exception {
39         }
40
41         @Test
42         public void testInit() {
43
44                 ServicePropertyService service = new ServicePropertyService();
45                 try {
46                         service.init();
47                 } catch (Exception e) {
48                         // TODO Auto-generated catch block
49                         e.printStackTrace();
50                 }
51                 assertTrue(true);
52
53         }
54         
55         @Test
56         public void testsetLoadOnStartup() {
57
58                 ServicePropertyService service = new ServicePropertyService();
59                 try {
60                         service.setLoadOnStartup(true);
61                 } catch (Exception e) {
62                         // TODO Auto-generated catch block
63                         e.printStackTrace();
64                 }
65                 assertTrue(true);
66
67         }
68         
69         @Test
70         public void testSetSsfFileMonitorPollingInterval() {
71
72                 ServicePropertyService service = new ServicePropertyService();
73                 try {
74                         service.setSsfFileMonitorPollingInterval("interval");
75                 } catch (Exception e) {
76                         // TODO Auto-generated catch block
77                         e.printStackTrace();
78                 }
79                 assertTrue(true);
80
81         }
82         
83         @Test
84         public void testSetSsfFileMonitorThreadpoolSize() {
85
86                 ServicePropertyService service = new ServicePropertyService();
87                 try {
88                         service.setSsfFileMonitorThreadpoolSize("threadPoolSize");
89                 } catch (Exception e) {
90                         // TODO Auto-generated catch block
91                         e.printStackTrace();
92                 }
93                 assertTrue(true);
94
95         }
96         
97         @Test
98         public void testIsLoadOnStartup() {
99                 ServicePropertyService service = new ServicePropertyService();
100                 service.isLoadOnStartup();
101                 assertTrue(true);
102
103         }
104         
105         @Test
106         public void testGetSsfFileMonitorPollingInterval() {
107                 ServicePropertyService service = new ServicePropertyService();
108                 service.getSsfFileMonitorPollingInterval();
109                 assertTrue(true);
110
111         }
112         
113         @Test
114         public void testGetSsfFileMonitorThreadpoolSize() {
115                 ServicePropertyService service = new ServicePropertyService();
116                 service.getSsfFileMonitorThreadpoolSize();
117                 assertTrue(true);
118
119         }
120         
121         @Test
122         public void testGetFileChangedListener() {
123                 ServicePropertyService service = new ServicePropertyService();
124                 service.getFileChangedListener();
125                 assertTrue(true);
126
127         }
128         
129         @Test
130         public void testSetFileChangedListener() {
131                 ServicePropertyService service = new ServicePropertyService();
132                 service.setFileChangedListener(null);
133                 assertTrue(true);
134
135         }
136         
137         @Test
138         public void testGetFilePropertiesMap() {
139                 ServicePropertyService service = new ServicePropertyService();
140                 service.getFilePropertiesMap();
141                 assertTrue(true);
142
143         }
144         
145         @Test
146         public void testSetFilePropertiesMap() {
147                 ServicePropertyService service = new ServicePropertyService();
148                 service.setFilePropertiesMap(null);
149                 assertTrue(true);
150
151         }
152
153 }