Fiddling with persistent properties in tests is dangerous. Let's be sure that

our tests pass even when we haven't run them before. We were relying on
sub.sub3 having been set and persisted from a previous test invocation.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2848 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2010-09-08 18:35:08 +00:00
parent ff243af527
commit 91e8240a48
@@ -61,11 +61,6 @@ public class ConfigTest
pconfig.setValue("prop2", "three");
assertEquals("three", pconfig.getValue("prop2", "two"));
List<String> list = CollectionUtil.addAll(new ArrayList<String>(), pconfig.keys());
Collections.sort(list);
assertEquals("(prop1, prop2, prop3, prop4, sub.sub1, sub.sub2, sub.sub3)",
StringUtil.toString(list));
// fiddly with sub-properties
pconfig.setValue("sub.sub3", "three");
Properties subprops = pconfig.getSubProperties("sub");
@@ -77,5 +72,11 @@ public class ConfigTest
}
Collections.sort(slist);
assertEquals("(sub1, sub2, sub3)", StringUtil.toString(slist));
// check the whole shebang
List<String> list = CollectionUtil.addAll(new ArrayList<String>(), pconfig.keys());
Collections.sort(list);
assertEquals("(prop1, prop2, prop3, prop4, sub.sub1, sub.sub2, sub.sub3)",
StringUtil.toString(list));
}
}