2b25dfd9f154940838ca7e92c04be25f42edd188
[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.appc.ApplicationControllerAction;
31 import org.onap.so.client.orchestration.AAICollectionResources;
32 import org.onap.so.client.orchestration.AAIConfigurationResources;
33 import org.onap.so.client.orchestration.AAIInstanceGroupResources;
34 import org.onap.so.client.orchestration.AAINetworkResources;
35 import org.onap.so.client.orchestration.AAIServiceInstanceResources;
36 import org.onap.so.client.orchestration.AAIVfModuleResources;
37 import org.onap.so.client.orchestration.AAIVnfResources;
38 import org.onap.so.client.orchestration.AAIVolumeGroupResources;
39 import org.onap.so.client.orchestration.AAIVpnBindingResources;
40 import org.onap.so.client.orchestration.NetworkAdapterResources;
41 import org.onap.so.client.orchestration.SDNCNetworkResources;
42 import org.onap.so.client.orchestration.SDNCServiceInstanceResources;
43 import org.onap.so.client.orchestration.SDNCVfModuleResources;
44 import org.onap.so.client.orchestration.SDNCVnfResources;
45 import org.onap.so.client.orchestration.VnfAdapterVfModuleResources;
46 import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources;
47 import org.onap.so.client.sdnc.SDNCClient;
48 import org.onap.so.db.catalog.client.CatalogDbClient;
49 import org.onap.so.db.request.client.RequestsDbClient;
50 import org.springframework.beans.factory.annotation.Qualifier;
51 import org.springframework.boot.test.context.SpringBootTest;
52 import org.springframework.boot.test.mock.mockito.MockBean;
53 import org.springframework.boot.test.mock.mockito.SpyBean;
54 import org.springframework.test.context.ActiveProfiles;
55 import org.springframework.test.context.junit4.SpringRunner;
56
57 @RunWith(SpringRunner.class)
58 @SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
59 @ActiveProfiles("test")
60 public abstract class BaseTaskTest extends TestDataSetup {
61         @MockBean
62         protected AAIVolumeGroupResources aaiVolumeGroupResources;
63         
64         @MockBean
65         protected AAIServiceInstanceResources aaiServiceInstanceResources;
66         
67         @MockBean
68         protected AAIVnfResources aaiVnfResources;
69         
70         @MockBean
71         protected AAIVfModuleResources aaiVfModuleResources;
72         
73         @MockBean
74         protected AAIVpnBindingResources aaiVpnBindingResources;
75         
76         @MockBean
77         protected AAINetworkResources aaiNetworkResources;
78         
79         @MockBean
80         protected AAICollectionResources aaiCollectionResources;
81         
82         @MockBean
83         protected NetworkAdapterResources networkAdapterResources;
84         
85         @MockBean
86         protected VnfAdapterVolumeGroupResources vnfAdapterVolumeGroupResources;
87         
88         @MockBean
89         protected VnfAdapterVfModuleResources vnfAdapterVfModuleResources;
90         
91         @MockBean
92         protected SDNCVnfResources sdncVnfResources;
93         
94         @MockBean
95         protected SDNCNetworkResources sdncNetworkResources;
96         
97         @MockBean
98         protected SDNCVfModuleResources sdncVfModuleResources;
99         
100         @MockBean
101         protected SDNCServiceInstanceResources sdncServiceInstanceResources;
102         
103         @MockBean
104         protected AssignNetworkBBUtils assignNetworkBBUtils;
105         
106         @MockBean
107         protected NetworkAdapterObjectMapper networkAdapterObjectMapper;
108         
109         @MockBean
110         protected AAIInstanceGroupResources aaiInstanceGroupResources;
111         
112         @MockBean
113         protected CatalogDbClient catalogDbClient;
114         
115         @MockBean
116         @Qualifier("RequestsDbClient")
117         protected RequestsDbClient requestsDbClient;
118         
119         @Mock
120         protected BBInputSetupUtils bbSetupUtils;
121         
122         @Mock
123         protected BBInputSetup bbInputSetup;
124         
125         @SpyBean
126         protected SDNCClient SPY_sdncClient;
127         
128         @MockBean
129         protected ApplicationControllerAction appCClient;
130
131         @MockBean
132         protected AAIConfigurationResources aaiConfigurationResources;
133 }