Package com.ecyrd.jspwiki.plugin

Source Code of com.ecyrd.jspwiki.plugin.GroupsTest

package com.ecyrd.jspwiki.plugin;

import java.util.Properties;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import com.ecyrd.jspwiki.TestEngine;

public class GroupsTest extends TestCase
{
    Properties props = new Properties();
    TestEngine testEngine;
   
    public GroupsTest( String s )
    {
        super( s );
    }

    public void setUp()
        throws Exception
    {
        props.load( TestEngine.findTestProperties() );

        testEngine = new TestEngine(props);
    }

    public void tearDown() throws Exception
    {
        super.tearDown();
       
        testEngine.deletePage( "Test" );
    }
   
    public void testTag() throws Exception
    {
        String src="[{Groups}]";
       
        testEngine.saveText( "Test", src );
       
        String res = testEngine.getHTML( "Test" );
       
        assertEquals( "<a href=\"/Group.jsp?group=Admin\">Admin</a>, "
                + "<a href=\"/Group.jsp?group=Art\">Art</a>, "
                + "<a href=\"/Group.jsp?group=Literature\">Literature</a>, "
                + "<a href=\"/Group.jsp?group=TV\">TV</a>\n"
                , res );
    }

    public static Test suite()
    {
        return new TestSuite( GroupsTest.class );
    }
}
TOP

Related Classes of com.ecyrd.jspwiki.plugin.GroupsTest

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.