Loading app/core/src/test/java/com/fsck/k9/TestHelper.ktdeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line package com.fsck.k9 fun String.crlf() = replace("\n", "\r\n") app/core/src/test/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParserTest.kt +1 −1 Original line number Diff line number Diff line package com.fsck.k9.autocrypt import com.fsck.k9.crlf import com.fsck.k9.mail.crlf import com.fsck.k9.mail.filter.Base64 import com.fsck.k9.mailstore.MimePartStreamParser import org.junit.Assert.assertArrayEquals Loading app/core/src/test/java/com/fsck/k9/mailstore/MimePartStreamParserTest.kt +1 −1 Original line number Diff line number Diff line package com.fsck.k9.mailstore import com.fsck.k9.crlf import com.fsck.k9.mail.crlf import com.fsck.k9.mail.internet.MimeBodyPart import com.fsck.k9.mail.internet.MimeMessage import com.fsck.k9.mail.internet.MimeMultipart Loading app/core/src/test/java/com/fsck/k9/message/quote/TextQuoteCreatorTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -3,10 +3,10 @@ package com.fsck.k9.message.quote import com.fsck.k9.Account.QuoteStyle import com.fsck.k9.RobolectricTest import com.fsck.k9.TestCoreResourceProvider import com.fsck.k9.crlf import com.fsck.k9.mail.Address import com.fsck.k9.mail.Message import com.fsck.k9.mail.Message.RecipientType import com.fsck.k9.mail.crlf import com.google.common.truth.Truth.assertThat import com.nhaarman.mockitokotlin2.doReturn import com.nhaarman.mockitokotlin2.eq Loading app/storage/src/test/java/com/fsck/k9/storage/messages/MessageDatabaseHelpers.kt +42 −0 Original line number Diff line number Diff line Loading @@ -158,3 +158,45 @@ data class MessageEntry( val messagePartId: Long?, val encryptionType: String? ) fun SQLiteDatabase.createMessagePart( type: Int = 0, root: Int? = null, parent: Int = -1, seq: Int = 0, mimeType: String = "text/plain", decodedBodySize: Int = 0, displayName: String? = null, header: String? = null, encoding: String = "7bit", charset: String? = null, dataLocation: Int = 0, data: ByteArray? = null, preamble: String? = null, epilogue: String? = null, boundary: String? = null, contentId: String? = null, serverExtra: String? = null ): Long { val values = ContentValues().apply { put("type", type) put("root", root) put("parent", parent) put("seq", seq) put("mime_type", mimeType) put("decoded_body_size", decodedBodySize) put("display_name", displayName) put("header", header) put("encoding", encoding) put("charset", charset) put("data_location", dataLocation) put("data", data) put("preamble", preamble) put("epilogue", epilogue) put("boundary", boundary) put("content_id", contentId) put("server_extra", serverExtra) } return insert("message_parts", null, values) } Loading
app/core/src/test/java/com/fsck/k9/TestHelper.ktdeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line package com.fsck.k9 fun String.crlf() = replace("\n", "\r\n")
app/core/src/test/java/com/fsck/k9/autocrypt/AutocryptGossipHeaderParserTest.kt +1 −1 Original line number Diff line number Diff line package com.fsck.k9.autocrypt import com.fsck.k9.crlf import com.fsck.k9.mail.crlf import com.fsck.k9.mail.filter.Base64 import com.fsck.k9.mailstore.MimePartStreamParser import org.junit.Assert.assertArrayEquals Loading
app/core/src/test/java/com/fsck/k9/mailstore/MimePartStreamParserTest.kt +1 −1 Original line number Diff line number Diff line package com.fsck.k9.mailstore import com.fsck.k9.crlf import com.fsck.k9.mail.crlf import com.fsck.k9.mail.internet.MimeBodyPart import com.fsck.k9.mail.internet.MimeMessage import com.fsck.k9.mail.internet.MimeMultipart Loading
app/core/src/test/java/com/fsck/k9/message/quote/TextQuoteCreatorTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -3,10 +3,10 @@ package com.fsck.k9.message.quote import com.fsck.k9.Account.QuoteStyle import com.fsck.k9.RobolectricTest import com.fsck.k9.TestCoreResourceProvider import com.fsck.k9.crlf import com.fsck.k9.mail.Address import com.fsck.k9.mail.Message import com.fsck.k9.mail.Message.RecipientType import com.fsck.k9.mail.crlf import com.google.common.truth.Truth.assertThat import com.nhaarman.mockitokotlin2.doReturn import com.nhaarman.mockitokotlin2.eq Loading
app/storage/src/test/java/com/fsck/k9/storage/messages/MessageDatabaseHelpers.kt +42 −0 Original line number Diff line number Diff line Loading @@ -158,3 +158,45 @@ data class MessageEntry( val messagePartId: Long?, val encryptionType: String? ) fun SQLiteDatabase.createMessagePart( type: Int = 0, root: Int? = null, parent: Int = -1, seq: Int = 0, mimeType: String = "text/plain", decodedBodySize: Int = 0, displayName: String? = null, header: String? = null, encoding: String = "7bit", charset: String? = null, dataLocation: Int = 0, data: ByteArray? = null, preamble: String? = null, epilogue: String? = null, boundary: String? = null, contentId: String? = null, serverExtra: String? = null ): Long { val values = ContentValues().apply { put("type", type) put("root", root) put("parent", parent) put("seq", seq) put("mime_type", mimeType) put("decoded_body_size", decodedBodySize) put("display_name", displayName) put("header", header) put("encoding", encoding) put("charset", charset) put("data_location", dataLocation) put("data", data) put("preamble", preamble) put("epilogue", epilogue) put("boundary", boundary) put("content_id", contentId) put("server_extra", serverExtra) } return insert("message_parts", null, values) }