Examples of WikiPage


Examples of org.apache.wiki.WikiPage

     *  be listed as non-existent.
     */
    public void testSimpleUndefined()
        throws Exception
    {
        WikiContext context2 = new WikiContext( testEngine, new WikiPage(testEngine, "Foobar") );

        String res = manager.execute( context2,
                                      "{INSERT org.apache.wiki.plugin.UndefinedPagesPlugin");

        String exp = "[Foobar 2]\\\\";
View Full Code Here

Examples of org.apache.wiki.WikiPage

     * @param pagename name of the page.
     * @return (english) contents corresponding to the given page name.
     */
    String getI18nHTML( String pagename )
    {
        WikiPage page = testEngine.getPage( pagename, WikiPageProvider.LATEST_VERSION );
        WikiContext context = new WikiContext( testEngine,
                                               testEngine.newHttpRequest(),
                                               page );
        context.setRequestContext( WikiContext.NONE );
        return testEngine.getHTML( context, page );
View Full Code Here

Examples of org.apache.wiki.WikiPage

                 "\n" +
                 "Content visible for Janne Jalkanen}]";
        String expected = "<p>Content visible for Janne Jalkanen</p>\n";
       
        testEngine.saveText( "Test", src );
        WikiPage page = testEngine.getPage( "Test", WikiPageProvider.LATEST_VERSION );
        WikiContext context = getJanneBasedWikiContextFor( page );
       
        String res = testEngine.getHTML( context, page );
        assertEquals( expected, res );
    }
View Full Code Here

Examples of org.apache.wiki.WikiPage

                     "\n" +
                     "Content NOT visible for Janne Jalkanen}]";
        String expected = "\n";
       
        testEngine.saveText( "Test", src );
        WikiPage page = testEngine.getPage( "Test", WikiPageProvider.LATEST_VERSION );
        WikiContext context = getJanneBasedWikiContextFor( page );
       
        String res = testEngine.getHTML( context, page );
        assertEquals( expected, res );
    }
View Full Code Here

Examples of org.apache.wiki.WikiPage

                     "\n" +
                     "Content visible for 127.0.0.1}]";
        String expected = "<p>Content visible for 127.0.0.1</p>\n";
       
        testEngine.saveText( "Test", src );
        WikiPage page = testEngine.getPage( "Test", WikiPageProvider.LATEST_VERSION );
        WikiContext context = getJanneBasedWikiContextFor( page );
       
        String res = testEngine.getHTML( context, page );
        assertEquals( expected, res );
    }
View Full Code Here

Examples of org.apache.wiki.WikiPage

                     "\n" +
                     "Content NOT visible for 127.0.0.1}]";
        String expected = "\n";
       
        testEngine.saveText( "Test", src );
        WikiPage page = testEngine.getPage( "Test", WikiPageProvider.LATEST_VERSION );
        WikiContext context = getJanneBasedWikiContextFor( page );
       
        String res = testEngine.getHTML( context, page );
        assertEquals( expected, res );
    }
View Full Code Here

Examples of org.apache.wiki.WikiPage

        throws IOException,
               NoRequiredPropertyException,
               ServletException
    {
        WikiContext context = new WikiContext( testEngine,
                                               new WikiPage(testEngine, "TestPage") );
       
        MarkupParser p = new JSPWikiMarkupParser( context, new StringReader(src) );
       
        WikiDocument dom = p.parse();
       
View Full Code Here

Examples of org.apache.wiki.WikiPage

    {
        // Create test page & attachment
        String src = "[{ALLOW edit Alice}] ";
        m_engine.saveText( "Test", src );

        WikiPage p = m_engine.getPage( "Test" );
        Permission view = PermissionFactory.getPagePermission( p, "view" );
        Permission edit = PermissionFactory.getPagePermission( p, "edit" );

        // Create session with authenticated user 'Alice', who can read & edit (in ACL)
        WikiSession session;
View Full Code Here

Examples of org.apache.wiki.WikiPage

    {
        // Create test page & attachment
        String src = "[{ALLOW edit Authenticated}] ";
        m_engine.saveText( "Test", src );

        WikiPage p = m_engine.getPage( "Test" );
        Permission view = PermissionFactory.getPagePermission( p, "view" );
        Permission edit = PermissionFactory.getPagePermission( p, "edit" );

        // Create session with authenticated user 'Alice', who can read & edit
        WikiSession session;
View Full Code Here

Examples of org.apache.wiki.WikiPage

    }

    public void testScandinavianLetters()
        throws Exception
    {
        WikiPage page = new WikiPage(m_engine, "\u00c5\u00e4Test");

        m_provider.putPageText( page, "test" );
       
        File resultfile = new File( m_pagedir, "%C5%E4Test.txt" );
       
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.