/**
* @version $Rev: 46019 $ $Date: 2004-09-14 04:56:06 -0500 (Tue, 14 Sep 2004) $
*/
public class HeaderTokenizerTest extends TestCase {
public void testTokenizer() throws ParseException {
Token t;
HeaderTokenizer ht;
ht =
new HeaderTokenizer("To: \"Geronimo List\" <geronimo-dev@apache.org>, \n\r Geronimo User <geronimo-user@apache.org>");
assertEquals("To", ht.peek().getValue());
assertEquals("To", ht.next().getValue());
assertEquals(":", ht.peek().getValue());
assertEquals(":", ht.next().getValue());
t = ht.next();
assertEquals("Geronimo List", t.getValue());
assertEquals(Token.QUOTEDSTRING, t.getType());
assertEquals("<", ht.next().getValue());
assertEquals("geronimo-dev", ht.next().getValue());
assertEquals("@", ht.next().getValue());
assertEquals("apache", ht.next().getValue());
assertEquals(".", ht.next().getValue());