Convert Braintree configuration to YAML

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146477578
This commit is contained in:
mcilwain 2017-02-03 08:32:35 -08:00 committed by Ben McIlwain
parent 223e8c2316
commit 8e9b2d3483
7 changed files with 75 additions and 38 deletions

View file

@ -53,7 +53,14 @@ public class YamlUtilsTest {
public void testSuccess_mergeEmptyMap_isNoop() {
String defaultYaml = join("one: ay", "two: bee", "three: sea");
assertThat(mergeYaml(defaultYaml, "# Just a comment\n"))
.isEqualTo("{one: ay, two: bee, three: sea}\n");
.isEqualTo("{one: ay, two: bee, three: sea}\n");
}
@Test
public void testSuccess_mergeNamedMap_overwritesEntirelyWithNewKey() {
String defaultYaml = join("one: ay", "two: bee", "threeMap:", " foo: bar", " baz: gak");
assertThat(mergeYaml(defaultYaml, "threeMap: {time: money}"))
.isEqualTo(join("one: ay", "two: bee", "threeMap: {time: money}"));
}
private static String join(CharSequence... strings) {