Loading feature/mail/message/list/src/test/kotlin/net/thunderbird/feature/mail/message/list/domain/usecase/BuildSwipeActionsTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ class BuildSwipeActionsTest { isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTime = false, isQuietTimeEnabled = false, ) @Test Loading Loading @@ -431,6 +435,18 @@ private class FakeGeneralSettingsManager( override fun setIsAutoFitWidth(isAutoFitWidth: Boolean) = error( "not implemented", ) override fun setQuietTimeEnds(quietTimeEnds: String) = error( "not implemented", ) override fun setQuietTimeStarts(quietTimeStarts: String) = error( "not implemented", ) override fun setIsQuietTimeEnabled(isQuietTimeEnabled: Boolean) = error( "not implemented", ) } private class FakeStorage( Loading legacy/core/src/test/java/com/fsck/k9/helper/MessageHelperTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ class MessageHelperTest : RobolectricTest() { isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, isQuietTimeEnabled = false, quietTimeEnds = "7:00", quietTimeStarts = "7:00", ), ) } Loading legacy/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationControllerTest.kt +39 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ import androidx.test.core.app.ApplicationProvider import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.android.testing.MockHelper.mockBuilder import net.thunderbird.core.android.testing.RobolectricTest import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import org.junit.Test import org.mockito.Mockito.verify import org.mockito.kotlin.any Loading Loading @@ -112,7 +116,41 @@ class AuthenticationErrorNotificationControllerTest : RobolectricTest() { } internal inner class TestAuthenticationErrorNotificationController : AuthenticationErrorNotificationController(notificationHelper, mock(), resourceProvider) { AuthenticationErrorNotificationController( notificationHelper, mock(), resourceProvider, mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ) { override fun createContentIntent(account: LegacyAccount, incoming: Boolean): PendingIntent { return contentIntent Loading legacy/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt +34 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ import androidx.test.core.app.ApplicationProvider import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.android.testing.MockHelper.mockBuilder import net.thunderbird.core.android.testing.RobolectricTest import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import org.junit.Test import org.mockito.Mockito.verify import org.mockito.kotlin.any Loading Loading @@ -116,6 +120,36 @@ class CertificateErrorNotificationControllerTest : RobolectricTest() { notificationHelper, mock(), resourceProvider, mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ) { override fun createContentIntent(account: LegacyAccount, incoming: Boolean): PendingIntent { return contentIntent Loading legacy/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt +37 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ import com.fsck.k9.mailstore.NotificationMessage import kotlin.test.assertNotNull import kotlinx.datetime.Instant import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import net.thunderbird.core.testing.TestClock import org.junit.Test import org.mockito.kotlin.doAnswer Loading @@ -44,7 +48,39 @@ class NewMailNotificationManagerTest { createNotificationRepository(), BaseNotificationDataCreator(), SingleMessageNotificationDataCreator(), SummaryNotificationDataCreator(SingleMessageNotificationDataCreator()), SummaryNotificationDataCreator( singleMessageNotificationDataCreator = SingleMessageNotificationDataCreator(), generalSettingsManager = mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ), clock, ) Loading Loading
feature/mail/message/list/src/test/kotlin/net/thunderbird/feature/mail/message/list/domain/usecase/BuildSwipeActionsTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ class BuildSwipeActionsTest { isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTime = false, isQuietTimeEnabled = false, ) @Test Loading Loading @@ -431,6 +435,18 @@ private class FakeGeneralSettingsManager( override fun setIsAutoFitWidth(isAutoFitWidth: Boolean) = error( "not implemented", ) override fun setQuietTimeEnds(quietTimeEnds: String) = error( "not implemented", ) override fun setQuietTimeStarts(quietTimeStarts: String) = error( "not implemented", ) override fun setIsQuietTimeEnabled(isQuietTimeEnabled: Boolean) = error( "not implemented", ) } private class FakeStorage( Loading
legacy/core/src/test/java/com/fsck/k9/helper/MessageHelperTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ class MessageHelperTest : RobolectricTest() { isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, isQuietTimeEnabled = false, quietTimeEnds = "7:00", quietTimeStarts = "7:00", ), ) } Loading
legacy/core/src/test/java/com/fsck/k9/notification/AuthenticationErrorNotificationControllerTest.kt +39 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ import androidx.test.core.app.ApplicationProvider import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.android.testing.MockHelper.mockBuilder import net.thunderbird.core.android.testing.RobolectricTest import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import org.junit.Test import org.mockito.Mockito.verify import org.mockito.kotlin.any Loading Loading @@ -112,7 +116,41 @@ class AuthenticationErrorNotificationControllerTest : RobolectricTest() { } internal inner class TestAuthenticationErrorNotificationController : AuthenticationErrorNotificationController(notificationHelper, mock(), resourceProvider) { AuthenticationErrorNotificationController( notificationHelper, mock(), resourceProvider, mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ) { override fun createContentIntent(account: LegacyAccount, incoming: Boolean): PendingIntent { return contentIntent Loading
legacy/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt +34 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ import androidx.test.core.app.ApplicationProvider import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.android.testing.MockHelper.mockBuilder import net.thunderbird.core.android.testing.RobolectricTest import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import org.junit.Test import org.mockito.Mockito.verify import org.mockito.kotlin.any Loading Loading @@ -116,6 +120,36 @@ class CertificateErrorNotificationControllerTest : RobolectricTest() { notificationHelper, mock(), resourceProvider, mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ) { override fun createContentIntent(account: LegacyAccount, incoming: Boolean): PendingIntent { return contentIntent Loading
legacy/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt +37 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ import com.fsck.k9.mailstore.NotificationMessage import kotlin.test.assertNotNull import kotlinx.datetime.Instant import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.preference.AppTheme import net.thunderbird.core.preference.BackgroundSync import net.thunderbird.core.preference.GeneralSettings import net.thunderbird.core.preference.SubTheme import net.thunderbird.core.testing.TestClock import org.junit.Test import org.mockito.kotlin.doAnswer Loading @@ -44,7 +48,39 @@ class NewMailNotificationManagerTest { createNotificationRepository(), BaseNotificationDataCreator(), SingleMessageNotificationDataCreator(), SummaryNotificationDataCreator(SingleMessageNotificationDataCreator()), SummaryNotificationDataCreator( singleMessageNotificationDataCreator = SingleMessageNotificationDataCreator(), generalSettingsManager = mock { on { getSettings() } doReturn GeneralSettings( backgroundSync = BackgroundSync.ALWAYS, showRecentChanges = true, appTheme = AppTheme.DARK, messageComposeTheme = SubTheme.DARK, isShowCorrespondentNames = true, fixedMessageViewTheme = true, messageViewTheme = SubTheme.DARK, isShowStarredCount = false, isShowUnifiedInbox = false, isShowMessageListStars = false, isShowAnimations = false, shouldShowSetupArchiveFolderDialog = false, isMessageListSenderAboveSubject = false, isShowContactName = false, isShowContactPicture = false, isChangeContactNameColor = false, isColorizeMissingContactPictures = false, isUseBackgroundAsUnreadIndicator = false, isShowComposeButtonOnMessageList = false, isThreadedViewEnabled = false, isUseMessageViewFixedWidthFont = false, isAutoFitWidth = false, isQuietTime = false, quietTimeStarts = "7:00", quietTimeEnds = "7:00", isQuietTimeEnabled = false, ) }, ), clock, ) Loading