Author: bago
Date: Thu May 29 04:40:21 2008
New Revision: 661300
URL: http://svn.apache.org/viewvc?rev=661300&view=rev
Log:
Added tests for ParseExceptions to extend MimeException.
Modified:
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/contenttype/ContentTypeTest.java
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
Modified:
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
URL:
http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java?rev=661300&r1=661299&r2=661300&view=diff
==============================================================================
---
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
(original)
+++
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
Thu May 29 04:40:21 2008
@@ -19,6 +19,7 @@
package org.apache.james.mime4j.field.address;
+import org.apache.james.mime4j.MimeException;
import org.apache.james.mime4j.field.address.parser.ParseException;
import java.io.BufferedReader;
@@ -35,6 +36,11 @@
public class AddressTest extends TestCase {
+ public void testExceptionTree() {
+ // make sure that our ParseException extends MimeException.
+ ParseException.class.asSubclass(MimeException.class);
+ }
+
public void testParse1() throws ParseException {
AddressList addrList = AddressList.parse("John Doe <[EMAIL
PROTECTED](comment). example>");
assertEquals(1, addrList.size());
Modified:
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/contenttype/ContentTypeTest.java
URL:
http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/contenttype/ContentTypeTest.java?rev=661300&r1=661299&r2=661300&view=diff
==============================================================================
---
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/contenttype/ContentTypeTest.java
(original)
+++
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/contenttype/ContentTypeTest.java
Thu May 29 04:40:21 2008
@@ -19,6 +19,7 @@
package org.apache.james.mime4j.field.contenttype;
+import org.apache.james.mime4j.MimeException;
import org.apache.james.mime4j.field.contenttype.parser.ContentTypeParser;
import org.apache.james.mime4j.field.contenttype.parser.ParseException;
@@ -28,6 +29,11 @@
public class ContentTypeTest extends TestCase {
+ public void testExceptionTree() {
+ // make sure that our ParseException extends MimeException.
+ ParseException.class.asSubclass(MimeException.class);
+ }
+
public void testContentType() throws ParseException {
test("one/two; three = four", "one", "two");
test("one/(foo)two; three = \"four\"", "one", "two");
Modified:
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
URL:
http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java?rev=661300&r1=661299&r2=661300&view=diff
==============================================================================
---
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
(original)
+++
james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
Thu May 29 04:40:21 2008
@@ -20,12 +20,19 @@
package org.apache.james.mime4j.field.datetime;
import junit.framework.TestCase;
+
+import org.apache.james.mime4j.MimeException;
import org.apache.james.mime4j.field.datetime.parser.DateTimeParser;
import org.apache.james.mime4j.field.datetime.parser.ParseException;
import java.io.StringReader;
public class DateTimeTest extends TestCase {
+
+ public void testExceptionTree() {
+ // make sure that our ParseException extends MimeException.
+ ParseException.class.asSubclass(MimeException.class);
+ }
public void testNormalDate() throws ParseException {
new DateTimeParser(new StringReader("Fri, 21 Nov 1997 09:55:06
-0600")).parseAll();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]