| }
@Test
public void test() {
try {
Plist plist;
StringBuffer sb;
HashMap<String,String> map;
//
map = new HashMap<String,String>();
sb = new StringBuffer();
build(sb,map,"WorkItems","0-59");
sb.append(",");
build(sb,map,"FailItems","17-18");
plist = new Plist(sb.toString());
validate(map,plist);
//
map = new HashMap<String,String>();
sb = new StringBuffer();
build(sb,map,"x","1");
sb.append(",");
build(sb,map,"y","2");
sb.append(",");
build(sb,map,"z","http://3");
plist = new Plist(sb.toString());
validate(map,plist);
//
map = new HashMap<String,String>();
plist = new Plist(null);
validate(map,plist);
plist = new Plist("x");
validate(map,plist);
plist = new Plist("x:");
validate(map,plist);
plist = new Plist(":1");
validate(map,plist);
plist = new Plist(",");
validate(map,plist);
plist = new Plist(":,");
validate(map,plist);
}
catch(Exception e) {
e.printStackTrace();
fail("Exception");
|