PropertiesToYamlConverter converter = new PropertiesToYamlConverter();
YamlConversionResult result = converter.convert(
"a.b.c=1\n"+
"a.b.d=2\n"
);
if (result.getSeverity() != ConversionStatus.OK) {
throw new IllegalStateException("Problem during conversion: \n"+result.getStatus().getEntries());
}
System.out.println(result.getYaml());
String expected =
"a:\n"+
" b:\n"+
" c: '1'\n"+
" d: '2'\n";
if (!result.getYaml().equals(expected)) {
throw new IllegalStateException("Not expected result! "+result.getYaml());
}
-
Notifications
You must be signed in to change notification settings - Fork 5
aclement/properties-to-yaml
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Convert properties file to yaml structure
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published