Containerization feature of SO
[so.git] / bpmn / so-bpmn-tasks / src / test / java / org / onap / so / bpmn / BaseTaskTest.java
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 package org.onap.so.bpmn;
21
22 import org.junit.runner.RunWith;
23 import org.mockito.Mock;
24 import org.onap.so.TestApplication;
25 import org.onap.so.bpmn.common.data.TestDataSetup;
26 import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils;
27 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
28 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
29 import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
30 import org.onap.so.client.orchestration.AAICollectionResources;
31 import org.onap.so.client.orchestration.AAIInstanceGroupResources;
32 import org.onap.so.client.orchestration.AAINetworkResources;
33 import org.onap.so.client.orchestration.AAIServiceInstanceResources;
34 import org.onap.so.client.orchestration.AAIVfModuleResources;
35 import org.onap.so.client.orchestration.AAIVnfResources;
36 import org.onap.so.client.orchestration.AAIVolumeGroupResources;
37 import org.onap.so.client.orchestration.AAIVpnBindingResources;
38 import org.onap.so.client.orchestration.NetworkAdapterResources;
39 import org.onap.so.client.orchestration.SDNCNetworkResources;
40 import org.onap.so.client.orchestration.SDNCServiceInstanceResources;
41 import org.onap.so.client.orchestration.SDNCVfModuleResources;
42 import org.onap.so.client.orchestration.SDNCVnfResources;
43 import org.onap.so.client.orchestration.VnfAdapterVfModuleResources;
44 import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources;
45 import org.onap.so.client.sdnc.SDNCClient;
46 import org.onap.so.db.catalog.client.CatalogDbClient;
47 import org.springframework.boot.test.context.SpringBootTest;
48 import org.springframework.boot.test.mock.mockito.MockBean;
49 import org.springframework.boot.test.mock.mockito.SpyBean;
50 import org.springframework.test.context.ActiveProfiles;
51 import org.springframework.test.context.junit4.SpringRunner;
52
53 @RunWith(SpringRunner.class)
54 @SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
55 @ActiveProfiles("test")
56 public abstract class BaseTaskTest extends TestDataSetup {
57         @MockBean
58         protected AAIVolumeGroupResources aaiVolumeGroupResources;
59         
60         @MockBean
61         protected AAIServiceInstanceResources aaiServiceInstanceResources;
62         
63         @MockBean
64         protected AAIVnfResources aaiVnfResources;
65         
66         @MockBean
67         protected AAIVfModuleResources aaiVfModuleResources;
68         
69         @MockBean
70         protected AAIVpnBindingResources aaiVpnBindingResources;
71         
72         @MockBean
73         protected AAINetworkResources aaiNetworkResources;
74         
75         @MockBean
76         protected AAICollectionResources aaiCollectionResources;
77         
78         @MockBean
79         protected NetworkAdapterResources networkAdapterResources;
80         
81         @MockBean
82         protected VnfAdapterVolumeGroupResources vnfAdapterVolumeGroupResources;
83         
84         @MockBean
85         protected VnfAdapterVfModuleResources vnfAdapterVfModuleResources;
86         
87         @MockBean
88         protected SDNCVnfResources sdncVnfResources;
89         
90         @MockBean
91         protected SDNCNetworkResources sdncNetworkResources;
92         
93         @MockBean
94         protected SDNCVfModuleResources sdncVfModuleResources;
95         
96         @MockBean
97         protected SDNCServiceInstanceResources sdncServiceInstanceResources;
98         
99         @MockBean
100         protected AssignNetworkBBUtils assignNetworkBBUtils;
101         
102         @MockBean
103         protected NetworkAdapterObjectMapper networkAdapterObjectMapper;
104         
105         @MockBean
106         protected AAIInstanceGroupResources aaiInstanceGroupResources;
107         
108         @MockBean
109         protected CatalogDbClient catalogDbClient;
110         
111         @Mock
112         protected BBInputSetupUtils bbSetupUtils;
113         
114         @Mock
115         protected BBInputSetup bbInputSetup;
116
117         @SpyBean
118         protected SDNCClient SPY_sdncClient;
119 }