Resolve app.testing dependency blocking oauth extraction
This commit is contained in:
parent
f72bd24fbd
commit
141dd0974c
37 changed files with 50 additions and 43 deletions
|
@ -28,6 +28,7 @@ dependencies {
|
|||
implementation(libs.mime4j.dom)
|
||||
|
||||
testApi(projects.core.testing)
|
||||
testApi(projects.core.android.testing)
|
||||
testImplementation(projects.mail.testing)
|
||||
testImplementation(projects.backend.imap)
|
||||
testImplementation(projects.mail.protocols.smtp)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.fsck.k9.autocrypt
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import org.junit.Test
|
||||
|
||||
class AutocryptDraftStateHeaderParserTest : RobolectricTest() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.io.FileNotFoundException;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.internet.BinaryTempFileBody;
|
||||
import com.fsck.k9.mail.internet.MimeMessage;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.fsck.k9.helper
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.Address
|
||||
import com.fsck.k9.mail.Message
|
||||
import com.fsck.k9.mail.Message.RecipientType
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.fsck.k9.helper;
|
||||
|
||||
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.mail.Address;
|
||||
import com.fsck.k9.mail.Message;
|
||||
import com.fsck.k9.mail.internet.MimeMessage;
|
||||
|
@ -10,7 +9,6 @@ import org.junit.Test;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
|
||||
public class ListHeadersTest extends RobolectricTest {
|
||||
private static final String[] TEST_EMAIL_ADDRESSES = new String[] {
|
||||
"prettyandsimple@example.com",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.fsck.k9.helper
|
||||
|
||||
import androidx.core.net.toUri
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNull
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.internet.MimeMessage
|
||||
import org.junit.Test
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.helper.MailTo.CaseInsensitiveParamWrapper;
|
||||
import com.fsck.k9.mail.Address;
|
||||
import org.junit.Rule;
|
||||
|
|
|
@ -4,12 +4,12 @@ import android.graphics.Color
|
|||
import android.text.SpannableString
|
||||
import app.k9mail.core.android.common.contact.Contact
|
||||
import app.k9mail.core.android.common.contact.ContactRepository
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import app.k9mail.core.common.mail.EmailAddress
|
||||
import app.k9mail.core.common.mail.toEmailAddressOrThrow
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isInstanceOf
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.helper.MessageHelper.Companion.toFriendly
|
||||
import com.fsck.k9.mail.Address
|
||||
import org.junit.Test
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.fsck.k9.helper;
|
||||
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.Account;
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import com.fsck.k9.helper.ReplyToParser.ReplyToAddresses;
|
||||
import com.fsck.k9.mail.Address;
|
||||
import com.fsck.k9.mail.Message;
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Map;
|
|||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.mail.BodyPart;
|
||||
import com.fsck.k9.mail.Multipart;
|
||||
import com.fsck.k9.mail.Part;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.fsck.k9.message
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isGreaterThan
|
||||
import com.fsck.k9.Account.QuoteStyle
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.internet.MimeHeaderChecker
|
||||
import com.fsck.k9.mail.internet.TextBody
|
||||
import org.junit.Test
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.fsck.k9.message
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.contains
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.helper.toCrLf
|
||||
import org.junit.Test
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.fsck.k9.message;
|
||||
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -13,10 +12,10 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.Account.QuoteStyle;
|
||||
import com.fsck.k9.CoreResourceProvider;
|
||||
import com.fsck.k9.Identity;
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import com.fsck.k9.TestCoreResourceProvider;
|
||||
import com.fsck.k9.mail.Address;
|
||||
import com.fsck.k9.mail.BodyPart;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.fsck.k9.message.extractors;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.fsck.k9.RobolectricTest;
|
||||
import app.k9mail.core.android.testing.RobolectricTest;
|
||||
import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mail.internet.MimeBodyPart;
|
||||
import com.fsck.k9.mail.internet.MimeHeader;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.fsck.k9.message.quote
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.Account.QuoteStyle
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.TestCoreResourceProvider
|
||||
import com.fsck.k9.mail.Address
|
||||
import com.fsck.k9.mail.Message
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.app.PendingIntent
|
|||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.testing.MockHelper.mockBuilder
|
||||
import org.junit.Test
|
||||
import org.mockito.Mockito.verify
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.app.PendingIntent
|
|||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.testing.MockHelper.mockBuilder
|
||||
import org.junit.Test
|
||||
import org.mockito.Mockito.verify
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.fsck.k9.notification
|
|||
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.testing.MockHelper.mockBuilder
|
||||
import org.junit.Test
|
||||
import org.mockito.Mockito.verify
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.fsck.k9.notification
|
||||
|
||||
import app.k9mail.core.android.common.contact.ContactRepository
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.controller.MessageReference
|
||||
import com.fsck.k9.mail.Address
|
||||
import com.fsck.k9.mail.Message.RecipientType
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.fsck.k9.notification
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.containsExactly
|
||||
import assertk.assertions.hasSize
|
||||
|
@ -12,7 +13,6 @@ import assertk.assertions.isNull
|
|||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.controller.MessageReference
|
||||
import kotlin.test.assertNotNull
|
||||
import org.junit.Test
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.app.PendingIntent
|
|||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.testing.MockHelper.mockBuilder
|
||||
import org.junit.Test
|
||||
import org.mockito.ArgumentMatchers.anyLong
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.app.PendingIntent
|
|||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mailstore.LocalFolder
|
||||
import com.fsck.k9.notification.NotificationIds.getFetchingMailNotificationId
|
||||
import com.fsck.k9.testing.MockHelper.mockBuilder
|
||||
|
|
|
@ -5,8 +5,8 @@ plugins {
|
|||
dependencies {
|
||||
implementation(projects.app.core)
|
||||
|
||||
api(libs.junit)
|
||||
api(libs.robolectric)
|
||||
api(projects.core.android.testing)
|
||||
|
||||
api(libs.koin.core)
|
||||
api(libs.mockito.core)
|
||||
api(libs.mockito.kotlin)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.fsck.k9.activity.compose
|
||||
|
||||
import android.os.Bundle
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.Address
|
||||
import org.junit.Test
|
||||
import org.mockito.kotlin.doReturn
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.fsck.k9.contacts
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.Address
|
||||
import org.junit.Test
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.fsck.k9.ui
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.size
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.core.R
|
||||
import org.junit.Test
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
|
|
|
@ -2,10 +2,10 @@ package com.fsck.k9.ui.helper
|
|||
|
||||
import android.os.Build
|
||||
import android.os.SystemClock
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import app.k9mail.core.testing.TestClock
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.fsck.k9.ui.helper
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.graphics.Color
|
|||
import android.text.Spannable
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import androidx.core.text.getSpans
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.containsExactly
|
||||
import assertk.assertions.isEqualTo
|
||||
|
@ -12,7 +13,6 @@ import assertk.assertions.isNotNull
|
|||
import assertk.assertions.isNull
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.helper.ContactNameProvider
|
||||
import com.fsck.k9.mail.Address
|
||||
import org.junit.Test
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.widget.TextView
|
|||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import app.k9mail.core.testing.TestClock
|
||||
import assertk.Assert
|
||||
import assertk.assertThat
|
||||
|
@ -21,7 +22,6 @@ import com.fsck.k9.Account
|
|||
import com.fsck.k9.FontSizes
|
||||
import com.fsck.k9.FontSizes.FONT_DEFAULT
|
||||
import com.fsck.k9.FontSizes.LARGE
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.UiDensity
|
||||
import com.fsck.k9.contacts.ContactPictureLoader
|
||||
import com.fsck.k9.mail.Address
|
||||
|
|
|
@ -4,13 +4,13 @@ import android.graphics.Color
|
|||
import android.text.Spannable
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import androidx.core.text.getSpans
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.containsExactly
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isInstanceOf
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.helper.ContactNameProvider
|
||||
import com.fsck.k9.mail.Address
|
||||
import org.junit.Test
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.fsck.k9.ui.messageview
|
||||
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNull
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import org.junit.Test
|
||||
|
||||
class RecipientLayoutCreatorTest : RobolectricTest() {
|
||||
|
|
12
core/android/testing/build.gradle.kts
Normal file
12
core/android/testing/build.gradle.kts
Normal file
|
@ -0,0 +1,12 @@
|
|||
plugins {
|
||||
id(ThunderbirdPlugins.Library.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.k9mail.core.android.testing"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.junit)
|
||||
api(libs.robolectric)
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.fsck.k9
|
||||
package app.k9mail.core.android.testing
|
||||
|
||||
import android.app.Application
|
||||
import org.junit.runner.RunWith
|
||||
|
@ -6,9 +6,7 @@ import org.robolectric.RobolectricTestRunner
|
|||
import org.robolectric.annotation.Config
|
||||
|
||||
/**
|
||||
* A Robolectric test that does not create an instance of our [Application] class [K9].
|
||||
*
|
||||
* See also [K9RobolectricTest].
|
||||
* A Robolectric test that does not create an instance of our [Application].
|
||||
*/
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(application = EmptyApplication::class)
|
|
@ -9,7 +9,7 @@ dependencies {
|
|||
|
||||
implementation(libs.timber)
|
||||
|
||||
testImplementation(projects.app.testing)
|
||||
testImplementation(projects.core.android.testing)
|
||||
testImplementation(projects.backend.imap)
|
||||
testImplementation(libs.robolectric)
|
||||
testImplementation(libs.androidx.test.core)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package app.k9mail.autodiscovery.providersxml
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import app.k9mail.core.android.testing.RobolectricTest
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import com.fsck.k9.RobolectricTest
|
||||
import com.fsck.k9.mail.AuthType
|
||||
import com.fsck.k9.mail.ConnectionSecurity
|
||||
import com.fsck.k9.oauth.OAuthConfiguration
|
||||
|
|
|
@ -52,6 +52,7 @@ include(
|
|||
":core:common",
|
||||
":core:testing",
|
||||
":core:android:common",
|
||||
":core:android:testing",
|
||||
":core:ui:compose:common",
|
||||
":core:ui:compose:designsystem",
|
||||
":core:ui:compose:theme",
|
||||
|
|
Loading…
Reference in a new issue