Remove unused imports and throws

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@826420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-10-18 12:16:50 +00:00
parent c634f0c64c
commit b287ebae61
4 changed files with 10 additions and 22 deletions

View File

@ -19,15 +19,12 @@
import junit.framework.TestCase;
import java.io.StringWriter;
import java.io.IOException;
/**
* Unit tests for {@link org.apache.commons.lang.text.translate.NumericEntityEscaper}.
*/
public class NumericEntityEscaperTest extends TestCase {
public void testBelow() throws IOException {
public void testBelow() {
NumericEntityEscaper nee = NumericEntityEscaper.below('F');
String input = "ADFGZ";
@ -35,7 +32,7 @@ public void testBelow() throws IOException {
assertEquals("Failed to escape numeric entities via the below method", "ADFGZ", result);
}
public void testBetween() throws IOException {
public void testBetween() {
NumericEntityEscaper nee = NumericEntityEscaper.between('F', 'L');
String input = "ADFGZ";
@ -43,7 +40,7 @@ public void testBetween() throws IOException {
assertEquals("Failed to escape numeric entities via the between method", "ADFGZ", result);
}
public void testAbove() throws IOException {
public void testAbove() {
NumericEntityEscaper nee = NumericEntityEscaper.above('F');
String input = "ADFGZ";

View File

@ -19,9 +19,6 @@
import junit.framework.TestCase;
import java.io.StringWriter;
import java.io.IOException;
/**
* Unit tests for {@link org.apache.commons.lang.text.translate.UnescapeUtils}.
*/

View File

@ -19,15 +19,12 @@
import junit.framework.TestCase;
import java.io.StringWriter;
import java.io.IOException;
/**
* Unit tests for {@link org.apache.commons.lang.text.translate.UnicodeEscaper}.
*/
public class UnicodeEscaperTest extends TestCase {
public void testBelow() throws IOException {
public void testBelow() {
UnicodeEscaper nee = UnicodeEscaper.below('F');
String input = "ADFGZ";
@ -35,7 +32,7 @@ public void testBelow() throws IOException {
assertEquals("Failed to escape unicode characters via the below method", "\\u0041\\u0044FGZ", result);
}
public void testBetween() throws IOException {
public void testBetween() {
UnicodeEscaper nee = UnicodeEscaper.between('F', 'L');
String input = "ADFGZ";
@ -43,7 +40,7 @@ public void testBetween() throws IOException {
assertEquals("Failed to escape unicode characters via the between method", "AD\\u0046\\u0047Z", result);
}
public void testAbove() throws IOException {
public void testAbove() {
UnicodeEscaper nee = UnicodeEscaper.above('F');
String input = "ADFGZ";

View File

@ -19,21 +19,18 @@
import junit.framework.TestCase;
import java.io.StringWriter;
import java.io.IOException;
/**
* Unit tests for {@link org.apache.commons.lang.text.translate.UnicodeEscaper}.
*/
public class UnicodeUnescaperTest extends TestCase {
// Requested in LANG-507
public void testUPlus() throws IOException {
public void testUPlus() {
UnicodeUnescaper uu = new UnicodeUnescaper();
String input = "\\u+0047";
try {
String result = uu.translate(input);
uu.translate(input);
fail("Default behaviour should not parse u+");
} catch(IllegalArgumentException iae) {
// expected
@ -43,7 +40,7 @@ public void testUPlus() throws IOException {
assertEquals("Failed to unescape unicode characters with 'u+' notation", "G", uu.translate(input));
}
public void testUuuuu() throws IOException {
public void testUuuuu() {
UnicodeUnescaper uu = new UnicodeUnescaper();
String input = "\\uuuuuuuu0047";
@ -51,7 +48,7 @@ public void testUuuuu() throws IOException {
assertEquals("Failed to unescape unicode characters with many 'u' characters", "G", result);
}
public void testLessThanFour() throws IOException {
public void testLessThanFour() {
UnicodeUnescaper uu = new UnicodeUnescaper();
String input = "\\0047\\u006";