add settings loader for yaml pipe
This commit is contained in:
parent
1330905066
commit
e9558c906f
1 changed files with 9 additions and 1 deletions
|
@ -49,13 +49,21 @@ public class YamlSettingsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultiLineString() throws IOException {
|
public void testRightAngleString() throws IOException {
|
||||||
String s = "test: >\n this is a\n multiline\n string\na: b\b";
|
String s = "test: >\n this is a\n multiline\n string\na: b\b";
|
||||||
SettingsLoader loader = new YamlSettingsLoader();
|
SettingsLoader loader = new YamlSettingsLoader();
|
||||||
Map<String, String> map = loader.load(s);
|
Map<String, String> map = loader.load(s);
|
||||||
assertEquals("{test=this is a multiline string, a=b}", map.toString());
|
assertEquals("{test=this is a multiline string, a=b}", map.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPipeString() throws IOException {
|
||||||
|
String s = "test: |\n this is a\n multiline\n string\na: b\b";
|
||||||
|
SettingsLoader loader = new YamlSettingsLoader();
|
||||||
|
Map<String, String> map = loader.load(s);
|
||||||
|
assertEquals("{test=this is a\nmultiline\nstring, a=b}", map.toString());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLoadFromMap() throws IOException {
|
public void testLoadFromMap() throws IOException {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
|
|
Loading…
Reference in a new issue