BpGen refactor Code Quality Issue-ID: DCAEGEN2-2502
[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  *  *  ================================================================================
8  *  *  Licensed under the Apache License, Version 2.0 (the "License");
9  *  *  you may not use this file except in compliance with the License.
10  *  *  You may obtain a copy of the License at
11  *  *
12  *  *       http://www.apache.org/licenses/LICENSE-2.0
13  *  *
14  *  *  Unless required by applicable law or agreed to in writing, software
15  *  *  distributed under the License is distributed on an "AS IS" BASIS,
16  *  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  *  *  See the License for the specific language governing permissions and
18  *  *  limitations under the License.
19  *  *  ============LICENSE_END=========================================================
20  *
21  *
22  */
23
24 package org.onap.blueprintgenerator.test;
25
26 import org.onap.blueprintgenerator.BlueprintGeneratorMainApplication;
27 import org.onap.blueprintgenerator.model.componentspec.OnapComponentSpec;
28 import org.onap.blueprintgenerator.service.OnapBlueprintService;
29 import org.onap.blueprintgenerator.service.common.ComponentSpecService;
30 import org.onap.blueprintgenerator.service.dmaap.DmaapBlueprintService;
31 import com.fasterxml.jackson.databind.ObjectMapper;
32 import org.junit.Ignore;
33 import org.junit.runner.RunWith;
34 import org.onap.policycreate.service.PolicyModelService;
35 import org.springframework.beans.factory.annotation.Autowired;
36 import org.springframework.beans.factory.annotation.Qualifier;
37 import org.springframework.beans.factory.annotation.Value;
38 import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
39 import org.springframework.test.context.ContextConfiguration;
40 import org.springframework.test.context.TestPropertySource;
41 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
42
43 /**
44  * @author : Ravi Mantena
45  * @date 10/16/2020 Application: ONAP - Blueprint Generator ONAP Test Cases
46  */
47 @RunWith(SpringJUnit4ClassRunner.class)
48 @ContextConfiguration(
49     classes = BlueprintGeneratorMainApplication.class,
50     initializers = ConfigFileApplicationContextInitializer.class)
51 @TestPropertySource(
52     properties = {
53         "ves=ves.json",
54         "testImports=testImports.yaml",
55         "useTlsTrueAndUseExternalTlsTrueTest=testComponentSpec_withTlsTrueAndExternalTlsTrue.json",
56         "useTlsFalseAndUseExternalTlsFalseTest=testComponentSpec_withTlsFalseAndExternalTlsFalse.json",
57         "useTlsTrueAndNoExternalTlsFlagTest=testComponentSpec_withTlsTrueAndNoExternalTls.json",
58         "noTlsInfo=testComponentSpec_withoutTlsInfo.json"
59     })
60 @Ignore
61 public class BlueprintGeneratorTests {
62
63     @Qualifier("objectMapper")
64     @Autowired
65     protected ObjectMapper objectMapper;
66
67     @Qualifier("yamlObjectMapper")
68     @Autowired
69     protected ObjectMapper yamlObjectMapper;
70
71     @Value("${ves}")
72     protected String ves;
73
74     @Value("${testImports}")
75     protected String testImports;
76
77     @Value("${useTlsTrueAndUseExternalTlsTrueTest}")
78     protected String useTlsTrueAndUseExternalTlsTrueTest;
79
80     @Value("${useTlsFalseAndUseExternalTlsFalseTest}")
81     protected String useTlsFalseAndUseExternalTlsFalseTest;
82
83     @Value("${useTlsTrueAndNoExternalTlsFlagTest}")
84     protected String useTlsTrueAndNoExternalTlsFlagTest;
85
86     @Value("${noTlsInfo}")
87     protected String noTlsInfo;
88
89     @Autowired
90     protected ComponentSpecService onapComponentSpecService;
91
92     @Autowired
93     protected DmaapBlueprintService dmaapBlueprintService;
94
95     @Autowired
96     protected OnapBlueprintService onapBlueprintService;
97
98     @Autowired
99     protected PolicyModelService policyModelService;
100
101     @Autowired
102     protected OnapTestUtils onapTestUtils;
103
104     protected OnapComponentSpec onapComponentSpec = null;
105 }