2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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 * Modifications copyright (c) 2019 Nokia
20 * ================================================================================
23 package org.openecomp.sdc.config;
25 import static org.mockito.Mockito.mock;
27 import org.apache.http.impl.client.CloseableHttpClient;
28 import org.junit.Test;
29 import org.onap.sdc.security.PortalClient;
30 import org.openecomp.sdc.be.auditing.impl.ConfigurationProvider;
31 import org.openecomp.sdc.be.components.impl.ComponentLocker;
32 import org.openecomp.sdc.be.components.impl.lock.ComponentLockAspect;
33 import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
34 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
35 import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao;
36 import org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter;
37 import org.openecomp.sdc.be.filters.PortalConfiguration;
38 import org.openecomp.sdc.be.filters.ThreadLocalUtils;
39 import org.openecomp.sdc.be.tosca.CommonCsarGenerator;
40 import org.openecomp.sdc.be.tosca.DefaultCsarGenerator;
42 public class CatalogBESpringConfigTest {
44 private CatalogBESpringConfig createTestSubject() {
45 return new CatalogBESpringConfig(mock(ComponentLocker.class));
49 public void testLifecycleBusinessLogic() throws Exception {
50 CatalogBESpringConfig testSubject;
51 LifecycleBusinessLogic result;
54 testSubject = createTestSubject();
55 result = testSubject.lifecycleBusinessLogic();
59 public void testConfigurationProvider() throws Exception {
60 CatalogBESpringConfig testSubject;
61 ConfigurationProvider result;
64 testSubject = createTestSubject();
65 result = testSubject.configurationProvider();
69 public void testAssetMetadataConverter() throws Exception {
70 CatalogBESpringConfig testSubject;
71 AssetMetadataConverter result;
74 testSubject = createTestSubject();
75 result = testSubject.assetMetadataConverter();
79 public void testComponentLockAspect() throws Exception {
80 CatalogBESpringConfig testSubject;
81 ComponentLockAspect result;
84 testSubject = createTestSubject();
85 result = testSubject.componentLockAspect();
89 public void testHttpClientConnectionManager() throws Exception {
90 CatalogBESpringConfig testSubject;
91 CloseableHttpClient result;
94 testSubject = createTestSubject();
95 result = testSubject.httpClientConnectionManager();
99 public void testPortalConfiguration() throws Exception {
100 CatalogBESpringConfig testSubject;
101 PortalConfiguration result;
104 testSubject = createTestSubject();
105 result = testSubject.portalConfiguration();
109 public void testThreadLocalUtils() throws Exception {
110 CatalogBESpringConfig testSubject;
111 ThreadLocalUtils result;
114 testSubject = createTestSubject();
115 result = testSubject.threadLocalUtils();
119 public void testPortalClient() throws Exception {
120 CatalogBESpringConfig testSubject;
124 testSubject = createTestSubject();
125 result = testSubject.portalClient();