assertEquals("", param.getName());
assertEquals("stuff", param.getValue());
}
public void testNameValueListParseBasics() {
ByteSequence buf = ContentUtil.encode(
"test; test1 = stuff ; test2 = \"stuff; stuff\"; test3=\"stuff");
ParserCursor cursor = new ParserCursor(0, buf.length());
List<NameValuePair> params = parser.parseParameters(buf, cursor);
assertEquals("test", params.get(0).getName());
assertEquals(null, params.get(0).getValue());
assertEquals("test1", params.get(1).getName());
assertEquals("stuff", params.get(1).getValue());
assertEquals("test2", params.get(2).getName());
assertEquals("stuff; stuff", params.get(2).getValue());
assertEquals("test3", params.get(3).getName());
assertEquals("stuff", params.get(3).getValue());
assertEquals(buf.length(), cursor.getPos());
assertTrue(cursor.atEnd());
}