assertEquals("/context/servlet/turbine", turi.getRelativeLink());
}
public void testAddParameterParser()
{
ParameterParser pp = new DefaultParameterParser();
pp.add("test", "");
turi.add(1, pp); // 1 = query data
assertEquals("/context/servlet/turbine?test=", turi.getRelativeLink());
turi.removeQueryData("test");
assertEquals("/context/servlet/turbine", turi.getRelativeLink());
pp = new DefaultParameterParser();
pp.add("test", (String) null);
turi.add(1, pp); // 1 = query data
// Should make the following work so as to be consistent with directly added values.
//assertEquals("/context/servlet/turbine?test=null", turi.getRelativeLink());
turi.removeQueryData("test");
assertEquals("/context/servlet/turbine", turi.getRelativeLink());
// TRB-8
pp = new DefaultParameterParser();
DiskFileItemFactory factory = new DiskFileItemFactory(10240, null);
FileItem test = factory.createItem("upload-field", "application/octet-stream", false, null);
pp.add("upload-field", test);
turi.add(1, pp); // 1 = query data
assertEquals("/context/servlet/turbine?upload-field=", turi.getRelativeLink());
turi.removeQueryData("upload-field");
assertEquals("/context/servlet/turbine", turi.getRelativeLink());
}