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.TestCase;
06: import junit.swingui.TestRunner;
07:
08: public class TextWidgetTest extends TestCase {
09: public static void main(String[] args) {
10: TestRunner
11: .main(new String[] { "fitnesse.wikitext.widgets.TextWidgetTest" });
12: }
13:
14: public void setUp() throws Exception {
15: }
16:
17: public void tearDown() throws Exception {
18: }
19:
20: public void testGetText() throws Exception {
21: TextWidget widget = new TextWidget(new MockWidgetRoot(),
22: "some text");
23: assertEquals("some text", widget.getText());
24: }
25:
26: public void testHtml() throws Exception {
27: TextWidget widget = new TextWidget(new MockWidgetRoot(),
28: "some text");
29: assertEquals("some text", widget.render());
30: }
31:
32: public void testAsWikiText() throws Exception {
33: TextWidget widget = new TextWidget(new MockWidgetRoot(),
34: "some text");
35: assertEquals("some text", widget.asWikiText());
36: }
37:
38: }
|