01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wikitext.widgets;
04:
05: import junit.framework.*;
06: import fitnesse.wiki.MockWikiPage;
07: import fitnesse.wikitext.WidgetBuilder;
08:
09: import java.util.List;
10:
11: public class TextIgnoringWidgetRootTest extends TestCase {
12: public void setUp() throws Exception {
13: }
14:
15: public void tearDown() throws Exception {
16: }
17:
18: public void testNoTextWidgetAreCreated() throws Exception {
19: String text = "Here is some text with '''bold''' and ''italics''.";
20: MockWikiPage page = new MockWikiPage("SomePage", text);
21: WidgetRoot root = new TextIgnoringWidgetRoot(text, page,
22: WidgetBuilder.htmlWidgetBuilder);
23: List widgets = root.getChildren();
24: assertEquals(2, widgets.size());
25: assertTrue(widgets.get(0) instanceof BoldWidget);
26: assertTrue(widgets.get(1) instanceof ItalicWidget);
27: }
28:
29: }
|