d1cb39169a6232bb15a3bb5f1830ea73b8de58fa
[vnfsdk/refrepo.git] /
1 /*
2  * Copyright (c) 2016, Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openo.gso.gui.servicegateway.service.impl;
18
19
20 import javax.servlet.http.HttpServletRequest;
21
22 import org.junit.Before;
23 import org.junit.Test;
24 import org.openo.baseservice.remoteservice.exception.ServiceException;
25
26 /**
27  * Test ServiceGatewayImpl Class.<br/>
28  * <p>
29  * </p>
30  * 
31  * @author
32  * @version GSO 0.5 2016/8/3
33  */
34 public class ServiceGatewayImplTest {
35
36     /**
37      * Service manager.
38      */
39     ServiceGatewayImpl serviceManager = new ServiceGatewayImpl();
40
41     /**
42      * Http request.
43      */
44     HttpServletRequest httpRequest;
45
46     @Before
47     public void start() {
48     }
49
50     /**
51      * Invalid parameter.<br/>
52      * 
53      * @throws ServiceException when parameter is wrong.
54      * @since GSO 0.5
55      */
56     @Test(expected = ServiceException.class)
57     public void testCreateServiceFail() throws ServiceException {
58         serviceManager.createService(null, httpRequest);
59     }
60
61     /**
62      * Invalid parameter.<br/>
63      * 
64      * @throws ServiceException when parameter is wrong.
65      * @since GSO 0.5
66      */
67     @Test(expected = ServiceException.class)
68     public void testDeleteServiceFail() throws ServiceException {       
69         serviceManager.deleteService(null, httpRequest);
70     }
71
72 }