X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fbabel%2Futil%2FArtifactTestUtils.java;h=066911ec6daae553ffb858ca416d057733dfa0b7;hb=bfde3ef00beb3c6f31cebfd12e90b9b9cdcc492e;hp=f5a5a947a65e5a68be265c49680a4f743c3b5f8c;hpb=f5dae47e293ae63a7a2f18230b772a699a52566f;p=aai%2Fbabel.git diff --git a/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java b/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java index f5a5a94..066911e 100644 --- a/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java +++ b/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2019 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,6 @@ import org.apache.commons.io.IOUtils; import org.custommonkey.xmlunit.Diff; import org.onap.aai.babel.parser.ArtifactGeneratorToscaParser; import org.onap.aai.babel.xml.generator.data.Artifact; -import org.onap.aai.babel.xml.generator.data.WidgetConfigurationUtil; import org.xml.sax.SAXException; /** @@ -52,42 +51,28 @@ import org.xml.sax.SAXException; */ public class ArtifactTestUtils { + public static final String CSAR_INPUTS_FOLDER = "compressedArtifacts/"; private static final String JSON_REQUESTS_FOLDER = "jsonFiles/"; private static final String JSON_RESPONSES_FOLDER = "response/"; - private static final String CSAR_INPUTS_FOLDER = "compressedArtifacts/"; /** - * Initialise System Properties for test configuration files. + * Initialize System Properties for test configuration files. */ public void setGeneratorSystemProperties() { - System.setProperty(ArtifactGeneratorToscaParser.PROPERTY_ARTIFACT_GENERATOR_CONFIG_FILE, - getResourcePath(Resources.ARTIFACT_GENERATOR_CONFIG)); - System.setProperty(ArtifactGeneratorToscaParser.PROPERTY_TOSCA_MAPPING_FILE, getResourcePath(Resources.TOSCA_MAPPING_CONFIG)); } /** - * Load the Widget to UUID mappings from the Artifact Generator Properties (resource). - * - * @throws IOException - * if the properties file is not loaded - */ - public void loadWidgetToUuidMappings() throws IOException { - WidgetConfigurationUtil.setConfig(getResourceAsProperties(Resources.ARTIFACT_GENERATOR_CONFIG)); - } - - /** - * Load the Widget to UUID mappings from the Artifact Generator Properties (resource). - * + * Load the Widget type mappings (resource). + * * @throws IOException - * if the properties file is not loaded + * if the configuration file is not loaded */ public void loadWidgetMappings() throws IOException { ArtifactGeneratorToscaParser.initToscaMappingsConfiguration(getResourcePath(Resources.TOSCA_MAPPING_CONFIG)); } - /** * Specific test method for the YAML Extractor test. * @@ -159,7 +144,7 @@ public class ArtifactTestUtils { /** * Create Properties from the content of the named resource (e.g. a file on the classpath). - * + * * @param resourceName * the resource name * @return Properties loaded from the named resource