⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 groupstest.java

📁 jspwiki source code,jspwiki source code
💻 JAVA
字号:
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 );    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -