Package org.apache.wiki

Examples of org.apache.wiki.TestEngine


        // Supply a custom LoginModule class
        props.put( "jspwiki.loginModule.class", "org.apache.wiki.auth.login.CookieAssertionLoginModule" );

        // Init the engine and verify that we initialized with a custom auth
        // login module
        WikiEngine engine = new TestEngine( props );
        AuthenticationManager authMgr = engine.getAuthenticationManager();
        assertEquals( CookieAssertionLoginModule.class, authMgr.m_loginModuleClass );
    }
View Full Code Here


        props.put( "jspwiki.loginModule.options.key2", "value2" );
        props.put( "jspwiki.loginModule.options.key3", "value3" );

        // Init the engine and verify that we initialized with the correct
        // options
        WikiEngine engine = new TestEngine( props );
        AuthenticationManager authMgr = engine.getAuthenticationManager();
        Map<String, String> options = authMgr.m_loginModuleOptions;
        assertEquals( 3, options.size() );
        assertTrue( options.containsKey( "key1" ) );
        assertTrue( options.containsKey( "key2" ) );
        assertTrue( options.containsKey( "key3" ) );
View Full Code Here

    }

    public void setUp()
        throws Exception
    {
        m_engine  = new TestEngine(props);

        TestEngine.deleteAll( new File(TextUtil.getRequiredProperty( props, BasicAttachmentProvider.PROP_STORAGEDIR )) );
       
        m_provider = new BasicAttachmentProvider();
        m_provider.initialize( m_engine, props );
View Full Code Here

    public void setUp()
        throws Exception
    {
        Properties props = TestEngine.getTestProperties();
        m_engine = new TestEngine(props);

        String text = "Foo";
        m_engine.saveText( "TestDefaultPage", text );

        text = "Bar. [{ALLOW edit Charlie, Herman}] ";
View Full Code Here

        throws Exception
    {
        m_props.load( TestEngine.findTestProperties() );
        PropertyConfigurator.configure(m_props);
       
        TestEngine testEngine = new TestEngine( m_props );
       
        m_context = new WikiContext( testEngine,
                                     new WikiPage( testEngine, PAGE_NAME ) );
    }
View Full Code Here

    {
        props.load( TestEngine.findTestProperties() );

        props.setProperty( WikiEngine.PROP_BASEURL, "http://localhost/" );
        props.setProperty( RSSGenerator.PROP_GENERATE_RSS, "true" );
        m_testEngine = new TestEngine(props);
    }
View Full Code Here

        diff.initialize(null, props);

        props.load( TestEngine.findTestProperties() );
        PropertyConfigurator.configure(props);
        TestEngine engine = new TestEngine(props);
       
        WikiContext ctx = new WikiContext( engine, new WikiPage(engine,"Dummy") );
        String actualDiff = diff.makeDiffHtml( ctx, oldText, newText);

        assertEquals(expectedDiff, actualDiff);
View Full Code Here

    public void setUp()
        throws Exception
    {
        props.load( TestEngine.findTestProperties() );
        PropertyConfigurator.configure(props);
        engine = new TestEngine(props);
    }
View Full Code Here

    {
        super.setUp();
       
        Properties props = new Properties();
        props.load( TestEngine.findTestProperties() );
        testEngine = new TestEngine( props );
    }
View Full Code Here

        throws WikiException
    {
        props.setProperty( WikiEngine.PROP_BASEURL, baseURL );
        if( prefix != null ) props.setProperty( ShortViewURLConstructor.PROP_PREFIX, prefix );
       
        testEngine = new TestEngine(props);
        URLConstructor constr = new ShortViewURLConstructor();
       
        constr.initialize( testEngine, props );
       
        return constr;
View Full Code Here

TOP

Related Classes of org.apache.wiki.TestEngine

Copyright © 2018 www.massapicom. 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.