/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.emailcommon.internet;
import com.android.email.R;
import com.android.email.provider.EmailProvider;
import com.android.emailcommon.internet.Rfc822Output;
import com.android.emailcommon.mail.MessagingException;
import com.android.emailcommon.provider.EmailContent;
import com.android.emailcommon.provider.EmailContent.Attachment;
import com.android.emailcommon.provider.EmailContent.Body;
import com.android.emailcommon.provider.EmailContent.Message;
import org.apache.james.mime4j.field.Field;
import org.apache.james.mime4j.message.BodyPart;
import org.apache.james.mime4j.message.Entity;
import org.apache.james.mime4j.message.Header;
import org.apache.james.mime4j.message.Multipart;
import android.content.Context;
import android.test.ProviderTestCase2;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Tests of the Rfc822Output (used for sending mail)
*
* You can run this entire test case with:
* runtest -c com.android.email.mail.transport.Rfc822OutputTests email
*/
public class Rfc822OutputTests extends ProviderTestCase2
This is also the body.";
/** Text-only version of the HTML reply body */
private static final String BODY_TEXT_REPLY_HTML =
">This is the body.\n>This is also the body.";
private static final String TEXT = "Here is some new text.";
// Full HTML document
private static String HTML_FULL_BODY = "