public void test_of_escaping() { PropertiesFile test = PropertiesFile.of(CharSource.wrap(FILE3)); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a=d=", "x"); assertEquals(test.getProperties(), PropertySet.of(keyValues1)); }
public void test_of_noLists() { PropertiesFile test = PropertiesFile.of(CharSource.wrap(FILE1)); Multimap<String, String> keyValues = ImmutableListMultimap.of("a", "x", "c", "z", "b", "y"); assertEquals(test.getProperties(), PropertySet.of(keyValues)); assertEquals(test.toString(), "{a=[x], c=[z], b=[y]}"); }
public void test_of_list() { PropertiesFile test = PropertiesFile.of(CharSource.wrap(FILE2)); Multimap<String, String> keyValues = ImmutableListMultimap.of("a", "x", "a", "y"); assertEquals(test.getProperties(), PropertySet.of(keyValues)); assertEquals(test.toString(), "{a=[x, y]}"); }
public void test_of_propertyNoEquals() { PropertiesFile test = PropertiesFile.of(CharSource.wrap("b\n")); Multimap<String, String> keyValues = ImmutableListMultimap.of("b", ""); assertEquals(test.getProperties(), PropertySet.of(keyValues)); assertEquals(test.toString(), "{b=[]}"); }
public void test_of_set() { Multimap<String, String> keyValues = ImmutableListMultimap.of("a", "x", "b", "y"); PropertiesFile test = PropertiesFile.of(PropertySet.of(keyValues)); assertEquals(test.getProperties(), PropertySet.of(keyValues)); assertEquals(test.toString(), "{a=[x], b=[y]}"); }