Fix sonar issues
[dcaegen2/platform.git] / mod / bpgenerator / onap / src / test / java / org / onap / blueprintgenerator / test / BlueprintGeneratorTests.java
1 /*
2  *
3  *  * ============LICENSE_START=======================================================
4  *  *  org.onap.dcae
5  *  *  ================================================================================
6  *  *  Copyright (c) 2020  AT&T Intellectual Property. All rights reserved.
7  *  *  Copyright (c) 2020  Nokia. All rights reserved.
8  *  *  ================================================================================
9  *  *  Licensed under the Apache License, Version 2.0 (the "License");
10  *  *  you may not use this file except in compliance with the License.
11  *  *  You may obtain a copy of the License at
12  *  *
13  *  *       http://www.apache.org/licenses/LICENSE-2.0
14  *  *
15  *  *  Unless required by applicable law or agreed to in writing, software
16  *  *  distributed under the License is distributed on an "AS IS" BASIS,
17  *  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  *  *  See the License for the specific language governing permissions and
19  *  *  limitations under the License.
20  *  *  ============LICENSE_END=========================================================
21  *
22  *
23  */
24
25 package org.onap.blueprintgenerator.test;
26
27 import com.fasterxml.jackson.databind.ObjectMapper;
28 import org.junit.Ignore;
29 import org.junit.runner.RunWith;
30 import org.onap.blueprintgenerator.BlueprintGeneratorConfiguration;
31 import org.onap.blueprintgenerator.model.componentspec.OnapComponentSpec;
32 import org.onap.blueprintgenerator.service.BlueprintCreatorService;
33 import org.onap.blueprintgenerator.service.base.BlueprintService;
34 import org.onap.blueprintgenerator.service.common.ComponentSpecService;
35 import org.onap.blueprintgenerator.service.dmaap.DmaapBlueprintCreatorService;
36 import org.onap.blueprintgenerator.service.onap.OnapBlueprintCreatorService;
37 import org.onap.policycreate.service.PolicyModelService;
38 import org.springframework.beans.factory.annotation.Autowired;
39 import org.springframework.beans.factory.annotation.Qualifier;
40 import org.springframework.beans.factory.annotation.Value;
41 import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
42 import org.springframework.test.context.ContextConfiguration;
43 import org.springframework.test.context.TestPropertySource;
44 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
45
46 /**
47  * @author : Ravi Mantena
48  * @date 10/16/2020
49  * Application: ONAP - Blueprint Generator ONAP Test Cases
50  */
51 @RunWith(SpringJUnit4ClassRunner.class)
52 @ContextConfiguration(
53     classes = BlueprintGeneratorConfiguration.class,
54     initializers = ConfigFileApplicationContextInitializer.class)
55 @TestPropertySource(
56     properties = {
57         "ves=ves.json",
58         "testImports=testImports.yaml",
59         "useTlsTrueAndUseExternalTlsTrueTest=testComponentSpec_withTlsTrueAndExternalTlsTrue.json",
60         "useTlsFalseAndUseExternalTlsFalseTest=testComponentSpec_withTlsFalseAndExternalTlsFalse.json",
61         "useTlsTrueAndNoExternalTlsFlagTest=testComponentSpec_withTlsTrueAndNoExternalTls.json",
62         "noTlsInfo=testComponentSpec_withoutTlsInfo.json"
63     })
64 @Ignore
65 public class BlueprintGeneratorTests {
66
67     @Qualifier("objectMapper")
68     @Autowired
69     protected ObjectMapper objectMapper;
70
71     @Qualifier("yamlObjectMapper")
72     @Autowired
73     protected ObjectMapper yamlObjectMapper;
74
75     @Value("${ves}")
76     protected String ves;
77
78     @Value("${testImports}")
79     protected String testImports;
80
81     @Value("${useTlsTrueAndUseExternalTlsTrueTest}")
82     protected String useTlsTrueAndUseExternalTlsTrueTest;
83
84     @Value("${useTlsFalseAndUseExternalTlsFalseTest}")
85     protected String useTlsFalseAndUseExternalTlsFalseTest;
86
87     @Value("${useTlsTrueAndNoExternalTlsFlagTest}")
88     protected String useTlsTrueAndNoExternalTlsFlagTest;
89
90     @Value("${noTlsInfo}")
91     protected String noTlsInfo;
92
93     @Autowired
94     protected ComponentSpecService onapComponentSpecService;
95
96     @Autowired
97     protected DmaapBlueprintCreatorService dmaapBlueprintCreatorService;
98
99     @Autowired
100     protected OnapBlueprintCreatorService onapBlueprintCreatorService;
101
102     @Autowired
103     protected BlueprintCreatorService blueprintCreatorService;
104
105     @Autowired
106     protected BlueprintService blueprintService;
107
108     @Autowired
109     protected PolicyModelService policyModelService;
110
111     @Autowired
112     protected OnapTestUtils onapTestUtils;
113
114     protected OnapComponentSpec onapComponentSpec = null;
115 }