82eb8d4a604c9749a9e6dceaa80f2e261fc82296
[so.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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.openecomp.mso.apihandlerinfra;
22
23 import static org.junit.Assert.assertTrue;
24
25 import javax.ws.rs.core.Response;
26 import javax.ws.rs.core.UriInfo;
27
28 import org.junit.Test;
29 import org.mockito.Mockito;
30
31 public class OrchestrationRequestsTest {
32
33         OrchestrationRequests req = new OrchestrationRequests();
34         
35         @Test
36         public void getOrchestrationRequestTest(){
37                 Response resp = req.getOrchestrationRequest("1001", "v3");
38                 assertTrue(resp.getEntity().toString() != null);
39         }
40         
41         @Test
42         public void getE2EServiceInstancesTest(){
43                 Response resp = req.getE2EServiceInstances("1001", "v3","599934");
44                 assertTrue(resp.getEntity().toString() != null);
45         }
46         
47         @Test
48         public void getOrchestrationRequest2Test(){
49                 UriInfo uriInfo = Mockito.mock(UriInfo.class);
50                 Response resp = req.getOrchestrationRequest(uriInfo, "v3");
51                 assertTrue(resp.getEntity().toString() != null);
52         }
53         
54         @Test
55         public void unlockOrchestrationRequestTest(){
56                 Response resp = req.unlockOrchestrationRequest("{\"result\":\"success\"}","1001", "v3");
57                 assertTrue(resp.getEntity().toString() != null);
58         }
59 }