james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r894647 - /james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java
Date Wed, 30 Dec 2009 15:24:28 GMT
Author: bago
Date: Wed Dec 30 15:24:28 2009
New Revision: 894647

URL: http://svn.apache.org/viewvc?rev=894647&view=rev
Log:
Revert uncompleted test methods committed previously by mistake.

Modified:
    james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java

Modified: james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java?rev=894647&r1=894646&r2=894647&view=diff
==============================================================================
--- james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java
(original)
+++ james/mime4j/branches/cycleclean/core/src/test/java/org/apache/james/mime4j/message/MessageHeadlessParserTest.java
Wed Dec 30 15:24:28 2009
@@ -29,46 +29,6 @@
 
 public class MessageHeadlessParserTest extends TestCase {
 
-
-	public void testMalformedHeaderShouldEndHeader() throws Exception {
-		String headlessContent = "Subject: my subject\r\n"
-			    + "Hi, how are you?\r\n"
-				+ "This is a simple message with no CRLFCELF between headers and body.\r\n"
-				+ "ThisIsNotAnHeader: because this should be already in the body\r\n"
-				+ "\r\n"
-				+ "Instead this should be better parsed as a text/plain body\r\n";
-
-		Message message = new Message(new ByteArrayInputStream(headlessContent
-				.getBytes("UTF-8")));
-		assertEquals("text/plain", message.getMimeType());
-		assertEquals(1, message.getHeader().getFields().size());
-		ContentTypeField contentTypeField = ((ContentTypeField) message
-				.getHeader().getField(FieldName.CONTENT_TYPE));
-		assertEquals("foo", contentTypeField.getBoundary());
-		Multipart multipart = (Multipart) message.getBody();
-		assertEquals(3, multipart.getCount());
-	}
-
-	public void testSimpleNonMimeTextHeadless() throws Exception {
-		String headlessContent = "Hi, how are you?\r\n"
-				+ "This is a simple message with no headers. While mime messages should start with\r\n"
-				+ "header: headervalue\r\n"
-				+ "\r\n"
-				+ "Instead this should be better parsed as a text/plain body\r\n";
-
-		MimeEntityConfig mimeEntityConfig = new MimeEntityConfig();
-		mimeEntityConfig.setDefaultContentType("text/plain");
-		Message message = new Message(new ByteArrayInputStream(headlessContent
-				.getBytes("UTF-8")), mimeEntityConfig);
-		assertEquals("text/plain", message.getMimeType());
-		assertEquals(1, message.getHeader().getFields().size());
-		ContentTypeField contentTypeField = ((ContentTypeField) message
-				.getHeader().getField(FieldName.CONTENT_TYPE));
-		assertEquals("foo", contentTypeField.getBoundary());
-		Multipart multipart = (Multipart) message.getBody();
-		assertEquals(3, multipart.getCount());
-	}
-
 	public void testMultipartFormContent() throws Exception {
 		String contentType = "multipart/form-data; boundary=foo";
 		String headlessContent = "\r\n"



Mime
View raw message