📄 stringutilstest.java
字号:
/*
* XP Forum
*
* Copyright (c) 2002-2003 RedSoft Group. All rights reserved.
*
*/
package org.redsoft.forum.util;
import junit.framework.TestCase;
/**
* Class Description here
*
* @author <a href="mailto:jwtronics@yahoo.com">John Wong</a>
*
* @version $Id: StringUtilsTest.java,v 1.1.1.1 2003/07/08 08:25:17 cinc Exp $
*/
public class StringUtilsTest extends TestCase {
public StringUtilsTest(String theName) {
super(theName);
}
public void testReplaceNewLine() {
assertEquals("Null string", null, StringUtils.escapeHTMLTags(null));
assertEquals("Escape < and >", "This is a test <string>.", StringUtils.escapeHTMLTags("This is a test <string>."));
}
public void testEscapeHTMLTags() {
assertEquals("Null string", null, StringUtils.replaceNewLine(null));
assertEquals("Escape new line", "This is a test <br> hehee.", StringUtils.replaceNewLine("This is a test \n hehee."));
}
}//EOC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -