2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 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=========================================================
23 import org.junit.BeforeClass;
25 import org.junit.ClassRule;
26 import org.junit.Rule;
27 import org.onap.aai.edges.EdgeIngestor;
28 import org.onap.aai.nodes.NodeIngestor;
29 import org.onap.aai.serialization.queryformats.QueryFormatTestHelper;
30 import org.onap.aai.setup.SchemaLocationsBean;
31 import org.onap.aai.util.AAIConstants;
32 import org.onap.aai.testutils.TestUtilConfigTranslatorforEdges;
33 import org.springframework.beans.factory.annotation.Autowired;
34 import org.springframework.test.context.ContextConfiguration;
35 import org.springframework.test.context.TestPropertySource;
36 import org.springframework.test.context.junit4.rules.SpringClassRule;
37 import org.springframework.test.context.junit4.rules.SpringMethodRule;
39 @ContextConfiguration(classes = {
40 SchemaLocationsBean.class,
41 TestUtilConfigTranslatorforEdges.class,
46 @TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/schemaIngest/schemaIngestTest.properties"})
47 public abstract class AAISetupForSwagger {
50 public static final SpringClassRule springClassRule = new SpringClassRule();
53 public final SpringMethodRule springMethodRule = new SpringMethodRule();
57 protected NodeIngestor nodeIngestor;
60 protected static final String SERVICE_NAME = "JUNIT";
63 public static void setupBundleconfig() throws Exception {
64 System.setProperty("AJSC_HOME", ".");
65 System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local");
66 System.setProperty("aai.service.name", SERVICE_NAME);
67 QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/");