1 4 package com.openedit.modules.html; 5 6 import junit.framework.TestCase; 7 8 11 public class EditorSessionTest extends TestCase 12 { 13 14 public EditorSessionTest( String arg0 ) 15 { 16 super( arg0 ); 17 } 19 20 public void testCreateVariable() 21 { 22 EditorSession session = new EditorSession(); 23 String variable = session.createVariable( "\\blah" ); 24 assertEquals( "\\\\blah", variable ); 25 System.out.println( variable ); 26 } 27 public void testReplace() 28 { 29 EditorSession session = new EditorSession(); 30 String content = session.removeBaseHrefAndFixQuotes("<p>Some"Junk" <a HREF=\"sdfdsf\" _base_href=\"dsfdf\" target=\"_parent\" >Junk</a>\nNew Line"); 31 assertEquals("<p>Some\"Junk\" <a HREF=\"sdfdsf\" target=\"_parent\" >Junk</a>\nNew Line", content); 32 } 33 } 34 | Popular Tags |