f6d5b3fa2cfeda44bae49591b52acbd8f20dde2f
[so.git] /
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP - SO\r
4  * ================================================================================\r
5  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.mso.apihandlerinfra;\r
22 \r
23 import org.junit.After;\r
24 \r
25 import static org.junit.Assert.assertEquals;\r
26 \r
27 import org.junit.Before;\r
28 import org.junit.Test;\r
29 \r
30 import static org.mockito.Mockito.mock;\r
31 import static org.mockito.Mockito.verify;\r
32 import static org.mockito.Mockito.when;\r
33 \r
34 \r
35 public class RecipeLookupResultTest {\r
36 \r
37     RecipeLookupResult instance;\r
38 \r
39     public RecipeLookupResultTest() {\r
40     }\r
41 \r
42     @Before\r
43     public void setUp() {\r
44         instance = mock(RecipeLookupResult.class);\r
45     }\r
46 \r
47     @After\r
48     public void tearDown() {\r
49         instance = null;\r
50     }\r
51 \r
52     /**\r
53      * Test of getOrchestrationURI method\r
54      */\r
55     @Test\r
56     public void testGetOrchestrationURI() {\r
57         String expResult = "orchestrationURI";\r
58         when(instance.getOrchestrationURI()).thenReturn(expResult);\r
59         String result = instance.getOrchestrationURI();\r
60         assertEquals(expResult, result);\r
61     }\r
62 \r
63 \r
64     /**\r
65      * Test of setOrchestrationURI method.\r
66      */\r
67     @Test\r
68     public void testSetOrchestrationURI() {\r
69         String orchestrationUri = "orchestrationURI";\r
70         instance.setOrchestrationURI(orchestrationUri);\r
71         verify(instance).setOrchestrationURI(orchestrationUri);\r
72     }\r
73 \r
74     /**\r
75      * Test of getRecipeTimeout method\r
76      */\r
77     @Test\r
78     public void testGetRecipeTimeout() {\r
79         int expResult = 10;\r
80         when(instance.getRecipeTimeout()).thenReturn(expResult);\r
81         int result = instance.getRecipeTimeout();\r
82         assertEquals(expResult, result);\r
83     }\r
84 \r
85 \r
86     /**\r
87      * Test of setRecipeTimeout method.\r
88      */\r
89     @Test\r
90     public void testSetRecipeTimeout() {\r
91         int recipeTimeOut = 10;\r
92         instance.setRecipeTimeout(recipeTimeOut);\r
93         verify(instance).setRecipeTimeout(10);\r
94     }\r
95 \r
96 \r
97 }\r
98