1 package org.openecomp.core.utilities.Yaml;
3 import org.openecomp.core.utilities.yaml.YamlUtil;
4 import org.junit.Before;
6 import testobjects.yaml.YamlFile;
9 public class YamlUtilTest {
15 initYamlFileContent();
18 void initYamlFileContent() {
19 yamlContent = "heat_template_version: ss\n" +
23 " description: network name of jsa log network\n" +
33 public void shouldConvertSimpleYamlToObject() {
34 new YamlUtil().yamlToObject(yamlContent, YamlFile.class);
38 /*public void loadCassandraParameters(){
39 YamlUtil yamlutil = new YamlUtil();
40 String cassandraKey = "cassandraConfig";
41 String configurationFile = "/configuration.yaml";
42 InputStream yamlAsIS = yamlutil.loadYamlFileIs(configurationFile);
43 Map<String, LinkedHashMap<String, Object>> configurationMap = yamlutil.yamlToMap(yamlAsIS);
44 LinkedHashMap<String, Object> cassandraConfiguration = configurationMap.get(cassandraKey);
45 System.out.println(cassandraConfiguration.entrySet());