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