1 4 package com.openedit.generators; 5 6 import com.openedit.BaseTestCase; 7 8 public class WikiTest extends BaseTestCase 9 { 10 public WikiTest(String inName) 11 { 12 super( inName); 13 } 14 15 public void testParse() throws Exception 16 { 17 WikiGenerator gen = new WikiGenerator(); 18 gen.setPageManager(getFixture().getPageManager()); 19 gen.setName("wiki"); 20 21 String res = gen.parseWiki("the [cat in] the hat", "/somedir/"); 22 String correct = "the <a HREF=\"cat_in.html\">cat in*</a> the hat"; 23 assertEquals(res,correct); 24 25 res = gen.parseWiki("link: [http://somelink.html] the hat", "/somedir/"); 26 correct = "link: <a HREF=\"http://somelink.html\">http://somelink.html</a> the hat"; 27 assertEquals(res,correct); 28 29 } 30 } 31 | Popular Tags |