|
From: <dr...@us...> - 2002-11-10 21:11:30
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/util
In directory usw-pr-cvs1:/tmp/cvs-serv11092/test/unit/org/webmacro/util
Added Files:
TestTextTool.java
Log Message:
- fixing bug #69: TextTool.rtim() trims too much
added a testcase for it
- added ability to run just one test:
example: ant test -Dtest=TestTextTool
--- NEW FILE: TestTextTool.java ---
/*
* Created by IntelliJ IDEA.
* User: e_ridge
* Date: Nov 10, 2002
* Time: 4:01:31 PM
* To change template for new class use
* Code Style | Class Templates options (Tools | IDE Options).
*/
package org.webmacro.util;
import junit.framework.TestCase;
import org.webmacro.servlet.TextTool;
public class TestTextTool extends TestCase {
public TestTextTool(String s) {
super(s);
}
public void testRTrim() {
String toTrim = "This is a test ";
String expected = "This is a test";
assertEquals (expected, TextTool.rtrim(toTrim));
}
public void testLTrim() {
String toTrim = " This is a test ";
String expected = "This is a test ";
assertEquals (expected, TextTool.ltrim(toTrim));
}
}
|