X-Git-Url: http://git.phpeclipse.com diff --git a/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/DefinitionListFilterTest.java b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/DefinitionListFilterTest.java new file mode 100644 index 0000000..8853c7e --- /dev/null +++ b/archive/org.plog4u.wiki.test/src/org/plog4u/wiki/test/filter/DefinitionListFilterTest.java @@ -0,0 +1,36 @@ +package org.plog4u.wiki.test.filter; + +import java.io.File; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.plog4u.wiki.filter.WikipediaFilter; + + +public class DefinitionListFilterTest extends FilterTestSupport { + public DefinitionListFilterTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + filter = new WikipediaFilter(); + super.setUp(); + } + + public static Test suite() { + return new TestSuite(DefinitionListFilterTest.class); + } + + public void testDefinitionList1() { + assertEquals("
term 
definition"+NEWLINE + "
term 2 
definition 2"+NEWLINE + + "
definition without term"+NEWLINE + "
", filter.filter("; term : definition"+NEWLINE + + "; term 2 : definition 2"+NEWLINE + ": definition without term", context)); + } + + public void testDefinitionList2() { + assertEquals("
term 2:definition 2"+NEWLINE + "
"+NEWLINE + "
definition 2"+NEWLINE + "
", filter.filter( + ";term 2:definition 2"+NEWLINE +NEWLINE + ": definition 2", context)); + } + +} \ No newline at end of file