8b5c6c679a06c53b1fbaccb1aa219422e4b4a01b
[vnfsdk/refrepo.git] /
1 /*\r
2  * Copyright (c) 2016, Huawei Technologies Co., Ltd.\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  * http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 package org.openo.gso.gui.servicegateway.roa.impl;\r
18 \r
19 import static org.junit.Assert.assertNotNull;\r
20 \r
21 import java.io.IOException;\r
22 import java.io.Reader;\r
23 import java.sql.Connection;\r
24 import java.sql.SQLException;\r
25 \r
26 import javax.servlet.http.HttpServletRequest;\r
27 \r
28 import org.apache.ibatis.io.Resources;\r
29 import org.apache.ibatis.jdbc.ScriptRunner;\r
30 import org.apache.ibatis.session.SqlSession;\r
31 import org.apache.ibatis.session.SqlSessionFactory;\r
32 import org.apache.ibatis.session.SqlSessionFactoryBuilder;\r
33 import org.junit.After;\r
34 import org.junit.Before;\r
35 import org.junit.Test;\r
36 import org.openo.baseservice.remoteservice.exception.ServiceException;\r
37 import org.openo.gso.gui.servicegateway.service.impl.ServiceGatewayImpl;\r
38 \r
39 /**\r
40  * Test ServicemgrRoaModuleImpl class.<br/>\r
41  * <p>\r
42  * </p>\r
43  * \r
44  * @author\r
45  * @version GSO 0.5 2016/8/3\r
46  */\r
47 public class ServiceGatewayRoaModuleImplTest {\r
48 \r
49     /**\r
50      * Service ROA.\r
51      */\r
52         ServiceGatewayRoaModuleImpl serviceRoa = new ServiceGatewayRoaModuleImpl();\r
53 \r
54     /**\r
55      * Service manager.\r
56      */\r
57         ServiceGatewayImpl serviceManager = new ServiceGatewayImpl();\r
58 \r
59 \r
60     /**\r
61      * Http request.\r
62      */\r
63     HttpServletRequest httpRequest;\r
64 \r
65     /**\r
66      * Before executing UT, start sql.<br/>\r
67      * \r
68      * @since GSO 0.5\r
69      */\r
70     @Before\r
71     public void start() throws IOException, SQLException {\r
72 \r
73     }\r
74 \r
75 \r
76 \r
77     /**\r
78      * After executing UT, close session<br/>\r
79      * \r
80      * @since GSO 0.5\r
81      */\r
82     @After\r
83     public void stop() {\r
84 \r
85     }\r
86 \r
87     /**\r
88      * Test create service.<br/>\r
89      * \r
90      * @throws ServiceException when fail to operate database or parameter is wrong.\r
91      * @since GSO 0.5\r
92      */\r
93     @Test\r
94     public void testCreateService() throws ServiceException {\r
95 \r
96     }\r
97 \r
98     /**\r
99      * Test delete service.<br/>\r
100      * \r
101      * @throws ServiceException when fail to operate database or parameter is wrong.\r
102      * @since GSO 0.5\r
103      */\r
104     @Test\r
105     public void testTeleteService() throws ServiceException {\r
106         serviceRoa.deleteService("1", httpRequest);\r
107     }\r
108 \r
109 }\r