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.swingui.TestRunner;
06: import fitnesse.wikitext.WikiWidget;
07:
08: public class NoteWidgetTest extends AbstractWidget {
09: public static void main(String[] args) {
10: TestRunner.main(new String[] { "NoteTestClass" });
11: }
12:
13: public void setUp() throws Exception {
14: }
15:
16: public void tearDown() throws Exception {
17: }
18:
19: public void testRegexp() throws Exception {
20: assertMatchEquals("!note some note", "!note some note");
21: assertMatchEquals("! note some note", null);
22: }
23:
24: public void test() throws Exception {
25: WikiWidget widget = new NoteWidget(new MockWidgetRoot(),
26: "!note some note");
27: assertEquals("<span class=\"note\">some note</span>", widget
28: .render());
29: }
30:
31: protected String getRegexp() {
32: return NoteWidget.REGEXP;
33: }
34: }
|