Add unit test for vfc-nfvo-wfengine
[vfc/nfvo/wfengine.git] / wfenginemgrservice / src / test / java / org / onap / workflow / resources / WorkflowAppTest.java
1 /**
2  * Copyright 2017 ZTE Corporation.
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.onap.workflow.resources;
18
19 import static org.powermock.api.mockito.PowerMockito.mock;
20
21 import org.junit.After;
22 import org.junit.AfterClass;
23 import org.junit.Before;
24 import org.junit.BeforeClass;
25 import org.junit.Test;
26 import org.onap.workflow.WorkflowApp;
27 import org.onap.workflow.WorkflowAppConfig;
28
29 import io.dropwizard.setup.Environment;
30
31 public class WorkflowAppTest {
32
33   @BeforeClass
34   public static void setUpBeforeClass() throws Exception {}
35
36   @AfterClass
37   public static void tearDownAfterClass() throws Exception {}
38
39   private WorkflowApp workflowApp;
40   private WorkflowAppConfig workflowAppConfig;
41   private Environment environment;
42
43   @Before
44   public void setUp() throws Exception {
45     workflowAppConfig = mock(WorkflowAppConfig.class);
46     environment = mock(Environment.class);
47     workflowApp = mock(WorkflowApp.class);
48   }
49
50   @After
51   public void tearDown() throws Exception {}
52
53   @Test
54   public void testMain() {
55
56   }
57
58   @Test
59   public void testGetName() {
60     workflowApp.getName();
61   }
62
63   @Test
64   public void testRunWorkflowAppConfigEnvironment() {
65     try {
66       workflowApp.run(workflowAppConfig, environment);
67     } catch (Exception e) {
68
69     }
70   }
71
72 }