1 package org.plog4u.wiki.test.filter;
5 import junit.framework.Test;
6 import junit.framework.TestSuite;
8 import org.plog4u.wiki.filter.WikipediaFilter;
11 public class DefinitionListFilterTest extends FilterTestSupport {
12 public DefinitionListFilterTest(String name) {
16 protected void setUp() throws Exception {
17 filter = new WikipediaFilter();
21 public static Test suite() {
22 return new TestSuite(DefinitionListFilterTest.class);
25 public void testDefinitionList1() {
26 assertEquals("<dl><dt> term </dt><dd> definition"+NEWLINE + "</dd><dt> term 2 </dt><dd> definition 2"+NEWLINE
27 + "</dd><dd> definition without term"+NEWLINE + "</dd></dl>", filter.filter("; term : definition"+NEWLINE
28 + "; term 2 : definition 2"+NEWLINE + ": definition without term", context));
31 public void testDefinitionList2() {
32 assertEquals("<dl><dt>term 2:definition 2"+NEWLINE + "</dt></dl>"+NEWLINE + "<dl><dd> definition 2"+NEWLINE + "</dd></dl>", filter.filter(
33 ";term 2:definition 2"+NEWLINE +NEWLINE + ": definition 2", context));