Package fitnesse.wikitext.parser

Source Code of fitnesse.wikitext.parser.SeeTest

package fitnesse.wikitext.parser;

import fitnesse.wiki.WikiPage;
import org.junit.Test;

public class SeeTest {
    @Test
    public void scansSees() {
        ParserTestHelper.assertScansTokenType("!see Stuff", "See", true);
        ParserTestHelper.assertScansTokenType("!seeStuff", "See", false);
        ParserTestHelper.assertScansTokenType(" !see Stuff", "See", false);
        ParserTestHelper.assertScansTokenType("| !see Stuff|", "See", true);
        ParserTestHelper.assertScansTokenType("!note !see Stuff", "See", true);
    }

    @Test public void parsesSees() throws Exception {
        ParserTestHelper.assertParses("!see SomeStuff", "SymbolList[See[WikiWord]]");
        ParserTestHelper.assertParses("!see ya", "SymbolList[Text, Whitespace, Text]");
    }

    @Test public void translatesSees() throws Exception{
        TestRoot root = new TestRoot();
        WikiPage page = root.makePage("PageOne", "!see PageTwo");
        root.makePage("PageTwo", "hi");
        ParserTestHelper.assertTranslatesTo(page, "<b>See: <a href=\"PageTwo\">PageTwo</a></b>");
    }
}
TOP

Related Classes of fitnesse.wikitext.parser.SeeTest

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.