KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > modules > html > HtmlEditorModuleTest


1 /*
2  * Created on Jan 27, 2004
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */

7 package com.openedit.modules.html;
8
9
10 import junit.framework.TestCase;
11
12 /**
13  * @author dbrown
14  *
15  * To change the template for this generated type comment go to
16  * Window>Preferences>Java>Code Generation>Code and Comments
17  */

18 public class HtmlEditorModuleTest extends TestCase {
19
20     public HtmlEditorModuleTest(String JavaDoc arg0) {
21         super(arg0);
22     }
23
24     public void testEscapeViewContent() {
25         String JavaDoc content = "Font family: \"Courier-new\"\r\nAnother: \"Verdana\"";
26         String JavaDoc desiredContent = "Font family: \\\"Courier-new\\\"\\nAnother: \\\"Verdana\\\"";
27
28         System.out.println("desiredContent = " + desiredContent );
29         //HtmlEditorModule module = new HtmlEditorModule();
30
EditorSession session = new EditorSession();
31         String JavaDoc newContent = session.createVariable( content );
32
33         assertEquals( "view content does not match", desiredContent, newContent );
34     }
35 }
36
Popular Tags