Examples of ReversePathAST


Examples of mireka.address.parser.ast.ReversePathAST

import org.junit.Test;

public class ReversePathTest {
    @Test
    public void testNullReversePath() throws Exception {
        ReversePathAST reversePathAST = new ReversePathParser("<>").parse();
        assertTrue(reversePathAST instanceof NullReversePathAST);
    }
View Full Code Here

Examples of mireka.address.parser.ast.ReversePathAST

        assertTrue(reversePathAST instanceof NullReversePathAST);
    }

    @Test
    public void testNonNullReversePath() throws Exception {
        ReversePathAST reversePathAST =
                new ReversePathParser("<john@example.com>").parse();
        assertTrue(reversePathAST instanceof RealReversePathAST);
        assertEquals(
                "john",
                ((RealReversePathAST) reversePathAST).pathAST.mailboxAST.localPartAST.spelling);
View Full Code Here

Examples of mireka.address.parser.ast.ReversePathAST

    public ReversePathParser(String source) {
        super(source);
    }

    public ReversePathAST parse() throws ParseException {
        ReversePathAST reversePathAST = parseReversePath();
        if (currentToken.ch != -1)
            throw currentToken.otherSyntaxException("Superfluous characters "
                    + "after reverse path: {0}");
        return reversePathAST;
    }
View Full Code Here

Examples of mireka.address.parser.ast.ReversePathAST

    public ReversePath createReversePath(String reversePathString)
            throws ParseException {
        String reversePathStringWithAngleBracket =
                "<" + reversePathString + ">";
        ReversePathAST reversePathAST =
                new ReversePathParser(reversePathStringWithAngleBracket)
                        .parse();
        if (reversePathAST instanceof NullReversePathAST) {
            return new NullReversePath();
        } else if (reversePathAST instanceof RealReversePathAST) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.