* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
*
package org.openecomp.sdc.asdctool.impl.validator.config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-/**
- * Created by chaya on 7/4/2017.
- */
public class ValidationConfigManager {
- private static Logger log = LoggerFactory.getLogger(ValidationConfigManager.class);
-
- private static Properties prop = new Properties();
private static String outputFullFilePath;
private static String outputFilePath;
}
private static String csvReportFilePath = "summary.csv";
-
- public static Properties setValidationConfiguration(String path) {
- InputStream input;
- try {
- input = new FileInputStream(path);
- prop.load(input);
- } catch (IOException ex) {
- log.info("FileInputStream failed", ex);
- }
- return prop;
- }
-
- public static Properties getValidationConfiguration() {
- return prop;
- }
}
ValidationConfigManager.setCsvReportFilePath(outputPath);
}
- @Test
- public void testSetValidationConfiguration() {
- String path = "";
- Properties result;
-
- // default test
- result = ValidationConfigManager.setValidationConfiguration(path);
- }
-
- @Test
- public void testGetValidationConfiguration() {
- Properties result;
-
- // default test
- result = ValidationConfigManager.getValidationConfiguration();
- }
-
@Test
public void testGetOutputFullFilePath() throws Exception {
String result;