Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package com.fsck.k9.preferences
package net.thunderbird.core.android.preferences

import com.fsck.k9.preferences.Storage
import com.fsck.k9.preferences.StorageEditor
import com.fsck.k9.preferences.StoragePersister
import com.fsck.k9.preferences.StorageUpdater

class InMemoryStoragePersister : StoragePersister {
private val values = mutableMapOf<String, Any?>()
Expand Down
2 changes: 1 addition & 1 deletion legacy/core/src/test/java/com/fsck/k9/PreferencesTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import assertk.assertions.isSameInstanceAs
import com.fsck.k9.mail.AuthType
import com.fsck.k9.mail.ConnectionSecurity
import com.fsck.k9.mail.ServerSettings
import com.fsck.k9.preferences.InMemoryStoragePersister
import kotlin.test.Test
import net.thunderbird.core.android.preferences.InMemoryStoragePersister
import org.junit.Before
import org.mockito.kotlin.any
import org.mockito.kotlin.doReturn
Expand Down
2 changes: 1 addition & 1 deletion legacy/core/src/test/java/com/fsck/k9/TestApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import com.fsck.k9.crypto.EncryptionExtractor
import com.fsck.k9.notification.NotificationActionCreator
import com.fsck.k9.notification.NotificationResourceProvider
import com.fsck.k9.notification.NotificationStrategy
import com.fsck.k9.preferences.InMemoryStoragePersister
import com.fsck.k9.preferences.StoragePersister
import com.fsck.k9.storage.storageModule
import net.thunderbird.core.android.preferences.InMemoryStoragePersister
import net.thunderbird.legacy.core.FakeAccountDefaultsProvider
import org.koin.core.qualifier.named
import org.koin.dsl.module
Expand Down
6 changes: 6 additions & 0 deletions legacy/testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ plugins {
}

dependencies {

implementation(projects.legacy.core)
api(projects.core.android.testing)

api(libs.koin.core)
api(libs.mockito.core)
api(libs.mockito.kotlin)
}

android {
Expand Down
17 changes: 0 additions & 17 deletions legacy/ui/legacy/src/test/java/com/fsck/k9/RobolectricTest.kt

This file was deleted.

2 changes: 1 addition & 1 deletion legacy/ui/legacy/src/test/java/com/fsck/k9/TestApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import app.k9mail.core.featureflag.InMemoryFeatureFlagProvider
import app.k9mail.feature.telemetry.telemetryModule
import app.k9mail.legacy.account.AccountDefaultsProvider
import app.k9mail.legacy.di.DI
import com.fsck.k9.preferences.InMemoryStoragePersister
import com.fsck.k9.preferences.StoragePersister
import net.thunderbird.core.android.preferences.InMemoryStoragePersister
import org.koin.dsl.module
import org.mockito.Mockito.mock

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Email;

import com.fsck.k9.RobolectricTest;
import com.fsck.k9.mail.Address;
import com.fsck.k9.view.RecipientSelectView.Recipient;
import com.fsck.k9.view.RecipientSelectView.RecipientCryptoStatus;
import net.thunderbird.core.android.testing.RobolectricTest;
import org.junit.Before;
import org.junit.Test;
import org.robolectric.RuntimeEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import assertk.assertThat
import assertk.assertions.isFalse
import assertk.assertions.isSameInstanceAs
import assertk.assertions.isTrue
import com.fsck.k9.RobolectricTest
import com.fsck.k9.mail.Address
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.fsck.k9.contacts

import assertk.assertThat
import assertk.assertions.isEqualTo
import com.fsck.k9.RobolectricTest
import com.fsck.k9.mail.Address
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test

class ContactLetterExtractorTest : RobolectricTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import assertk.assertThat
import assertk.assertions.isEqualTo
import com.fsck.k9.RobolectricTest
import com.fsck.k9.ui.R
import com.google.android.material.textview.MaterialTextView
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Before
import org.junit.Test
import org.robolectric.Robolectric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

import com.fsck.k9.RobolectricTest;
import com.fsck.k9.autocrypt.AutocryptOperations;
import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Body;
Expand All @@ -20,6 +18,7 @@
import com.fsck.k9.mailstore.CryptoResultAnnotation;
import com.fsck.k9.mailstore.CryptoResultAnnotation.CryptoError;
import com.fsck.k9.mailstore.MessageCryptoAnnotations;
import net.thunderbird.core.android.testing.RobolectricTest;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import android.os.SystemClock
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
import java.util.TimeZone
import kotlinx.datetime.Instant
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Before
import org.junit.Test
import org.robolectric.RuntimeEnvironment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.fsck.k9.ui.helper

import assertk.assertThat
import assertk.assertions.isEqualTo
import com.fsck.k9.RobolectricTest
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import assertk.assertions.isEqualTo
import assertk.assertions.isInstanceOf
import assertk.assertions.isNotNull
import assertk.assertions.isNull
import com.fsck.k9.RobolectricTest
import com.fsck.k9.helper.ContactNameProvider
import com.fsck.k9.mail.Address
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test

private const val IDENTITY_NAME = "Alice"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import assertk.assertions.support.expected
import com.fsck.k9.FontSizes
import com.fsck.k9.FontSizes.Companion.FONT_DEFAULT
import com.fsck.k9.FontSizes.Companion.LARGE
import com.fsck.k9.RobolectricTest
import com.fsck.k9.UiDensity
import com.fsck.k9.contacts.ContactPictureLoader
import com.fsck.k9.mail.Address
import com.fsck.k9.ui.R
import com.fsck.k9.ui.helper.RelativeDateTimeFormatter
import com.google.android.material.textview.MaterialTextView
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test
import org.mockito.kotlin.mock
import org.robolectric.Robolectric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import assertk.assertThat
import assertk.assertions.containsExactly
import assertk.assertions.isEqualTo
import assertk.assertions.isInstanceOf
import com.fsck.k9.RobolectricTest
import com.fsck.k9.helper.ContactNameProvider
import com.fsck.k9.mail.Address
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test

private const val IDENTITY_ADDRESS = "me@domain.example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import assertk.assertThat
import assertk.assertions.isEqualTo
import assertk.assertions.isInstanceOf
import assertk.assertions.isNull
import com.fsck.k9.RobolectricTest
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Test

private const val COLOR = 0xFF0000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import assertk.all
import assertk.assertThat
import assertk.assertions.isEqualTo
import assertk.assertions.prop
import com.fsck.k9.RobolectricTest
import com.fsck.k9.provider.AttachmentTempFileProvider
import kotlin.test.Test
import net.thunderbird.core.android.testing.RobolectricTest
import org.junit.Before
import org.robolectric.Robolectric
import org.robolectric.Shadows.shadowOf
Expand Down