Merge pull request #7472 from thunderbird/bump-assertk
Bump assertk 0.27.0 -> 0.28.0
This commit is contained in:
commit
a691508bb6
16 changed files with 55 additions and 54 deletions
|
@ -3,9 +3,9 @@ package com.fsck.k9.mailstore
|
|||
import assertk.assertThat
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNotSameAs
|
||||
import assertk.assertions.isNotSameInstanceAs
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.mail.Flag
|
||||
import java.util.UUID
|
||||
|
@ -55,7 +55,7 @@ class MessageListCacheTest {
|
|||
|
||||
val cache2 = MessageListCache.getCache("u002")
|
||||
|
||||
assertThat(cache2).isNotSameAs(cache)
|
||||
assertThat(cache2).isNotSameInstanceAs(cache)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -64,7 +64,7 @@ class MessageListCacheTest {
|
|||
|
||||
val cache2 = MessageListCache.getCache("u001")
|
||||
|
||||
assertThat(cache2).isSameAs(cache)
|
||||
assertThat(cache2).isSameInstanceAs(cache)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.fsck.k9.mailstore
|
||||
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.AccountRemovedListener
|
||||
import com.fsck.k9.preferences.AccountManager
|
||||
|
@ -26,8 +26,8 @@ class MessageStoreManagerTest {
|
|||
val accountManager = mock<AccountManager>()
|
||||
val messageStoreManager = MessageStoreManager(accountManager, messageStoreFactory)
|
||||
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameAs(messageStore1)
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameAs(messageStore1)
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameInstanceAs(messageStore1)
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameInstanceAs(messageStore1)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -38,11 +38,11 @@ class MessageStoreManagerTest {
|
|||
}
|
||||
val messageStoreManager = MessageStoreManager(accountManager, messageStoreFactory)
|
||||
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameAs(messageStore1)
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameInstanceAs(messageStore1)
|
||||
|
||||
listenerCaptor.firstValue.onAccountRemoved(account)
|
||||
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameAs(messageStore2)
|
||||
assertThat(messageStoreManager.getMessageStore(account)).isSameInstanceAs(messageStore2)
|
||||
}
|
||||
|
||||
private fun <T : Any> KStubbing<T>.doNothingOn(block: T.() -> Any) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.fsck.k9.message.html
|
|||
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import org.junit.Test
|
||||
|
||||
class EmailSectionTest {
|
||||
|
@ -47,7 +47,7 @@ class EmailSectionTest {
|
|||
fun subSequence() {
|
||||
val section = "[ One][ Two][ Three]".asEmailSection()
|
||||
|
||||
assertThat(section.subSequence(0, 11)).isSameAs(section)
|
||||
assertThat(section.subSequence(0, 11)).isSameInstanceAs(section)
|
||||
assertThat(section.subSequence(0, 3).asString()).isEqualTo("One")
|
||||
assertThat(section.subSequence(0, 2).asString()).isEqualTo("On")
|
||||
assertThat(section.subSequence(1, 3).asString()).isEqualTo("ne")
|
||||
|
@ -82,6 +82,7 @@ class EmailSectionTest {
|
|||
isStartOfLine = true
|
||||
spaces = 0
|
||||
}
|
||||
|
||||
' ' -> if (isStartOfLine) spaces++
|
||||
']' -> builder.addSegment(spaces, startIndex, index)
|
||||
else -> isStartOfLine = false
|
||||
|
|
|
@ -4,7 +4,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isInstanceOf
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.K9
|
||||
|
@ -25,7 +25,7 @@ class BaseNotificationDataCreatorTest {
|
|||
|
||||
val result = notificationDataCreator.createBaseNotificationData(notificationData)
|
||||
|
||||
assertThat(result.account).isSameAs(account)
|
||||
assertThat(result.account).isSameInstanceAs(account)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -10,7 +10,7 @@ import assertk.assertions.isFalse
|
|||
import assertk.assertions.isInstanceOf
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.controller.MessageReference
|
||||
|
@ -189,12 +189,12 @@ class NotificationDataStoreTest : RobolectricTest() {
|
|||
assertNotNull(resultOne)
|
||||
assertNotNull(resultTwo)
|
||||
assertThat(resultTwo.notificationData.activeNotifications).hasSize(1)
|
||||
assertThat(resultTwo.notificationData.activeNotifications.first().content).isSameAs(content2)
|
||||
assertThat(resultTwo.notificationData.activeNotifications.first().content).isSameInstanceAs(content2)
|
||||
assertThat(resultTwo.notificationStoreOperations).isEmpty()
|
||||
with(resultTwo.notificationHolder) {
|
||||
assertThat(notificationId).isEqualTo(resultOne.notificationHolder.notificationId)
|
||||
assertThat(timestamp).isEqualTo(resultOne.notificationHolder.timestamp)
|
||||
assertThat(content).isSameAs(content2)
|
||||
assertThat(content).isSameInstanceAs(content2)
|
||||
}
|
||||
assertThat(resultTwo.shouldCancelNotification).isFalse()
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ class NotificationDataStoreTest : RobolectricTest() {
|
|||
val notificationHolder = resultTwo.notificationData.activeNotifications.first { notificationHolder ->
|
||||
notificationHolder.content.messageReference == content.messageReference
|
||||
}
|
||||
assertThat(notificationHolder.content).isSameAs(content)
|
||||
assertThat(notificationHolder.content).isSameInstanceAs(content)
|
||||
}
|
||||
|
||||
private fun createAccount(): Account {
|
||||
|
|
|
@ -6,7 +6,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.contains
|
||||
import assertk.assertions.containsOnly
|
||||
import assertk.assertions.isEmpty
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.preferences.K9StoragePersister.StoragePersistOperationCallback
|
||||
import com.fsck.k9.preferences.K9StoragePersister.StoragePersistOperations
|
||||
|
@ -65,7 +65,7 @@ class StoragePersisterTest : K9RobolectricTest() {
|
|||
|
||||
assertFailure {
|
||||
storagePersister.doInTransaction(operationCallback)
|
||||
}.isSameAs(exception)
|
||||
}.isSameInstanceAs(exception)
|
||||
|
||||
val values = storagePersister.loadValues()
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ 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.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.mail.Address
|
||||
|
@ -45,7 +45,7 @@ class ReplyToPresenterTest : RobolectricTest() {
|
|||
|
||||
val result = replyToPresenter.getAddresses()
|
||||
|
||||
assertThat(result).isSameAs(addresses)
|
||||
assertThat(result).isSameInstanceAs(addresses)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,7 +14,7 @@ import assertk.assertions.isEqualTo
|
|||
import assertk.assertions.isInstanceOf
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.Account.QuoteStyle
|
||||
import com.fsck.k9.CoreResourceProvider
|
||||
import com.fsck.k9.Identity
|
||||
|
@ -272,7 +272,7 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
|
|||
verifyNoMoreInteractions(mockCallback)
|
||||
|
||||
val pendingIntent = captor.value
|
||||
assertThat(pendingIntent).isSameAs(mockPendingIntent)
|
||||
assertThat(pendingIntent).isSameInstanceAs(mockPendingIntent)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.fsck.k9.backend.imap
|
|||
|
||||
import app.k9mail.backend.testing.InMemoryBackendStorage
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.containsAll
|
||||
import assertk.assertions.containsAtLeast
|
||||
import assertk.assertions.containsExactlyInAnyOrder
|
||||
import assertk.assertions.isEmpty
|
||||
import assertk.assertions.isFalse
|
||||
|
@ -193,7 +193,7 @@ class ImapSyncTest {
|
|||
|
||||
imapSync.sync(FOLDER_SERVER_ID, defaultSyncConfig, syncListener)
|
||||
|
||||
assertThat(backendFolder.getMessageFlags(messageServerId = "2")).containsAll(Flag.SEEN, Flag.ANSWERED)
|
||||
assertThat(backendFolder.getMessageFlags(messageServerId = "2")).containsAtLeast(Flag.SEEN, Flag.ANSWERED)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -5,7 +5,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.containsExactlyInAnyOrder
|
||||
import assertk.assertions.isEmpty
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import kotlin.test.Test
|
||||
|
||||
class EmailAddressTest {
|
||||
|
@ -16,7 +16,7 @@ class EmailAddressTest {
|
|||
|
||||
assertThat(emailAddress.localPart).isEqualTo("user")
|
||||
assertThat(emailAddress.encodedLocalPart).isEqualTo("user")
|
||||
assertThat(emailAddress.domain).isSameAs(domain)
|
||||
assertThat(emailAddress.domain).isSameInstanceAs(domain)
|
||||
assertThat(emailAddress.address).isEqualTo("user@DOMAIN.example")
|
||||
assertThat(emailAddress.normalizedAddress).isEqualTo("user@domain.example")
|
||||
assertThat(emailAddress.toString()).isEqualTo("user@DOMAIN.example")
|
||||
|
|
|
@ -7,9 +7,9 @@ import assertk.all
|
|||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isFalse
|
||||
import assertk.assertions.isNotSameAs
|
||||
import assertk.assertions.isNotSameInstanceAs
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import assertk.assertions.prop
|
||||
import org.junit.Test
|
||||
|
@ -52,7 +52,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateValue(data.updatedValue)
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.updatedValue)
|
||||
hasNoError()
|
||||
isNotValid()
|
||||
|
@ -70,7 +70,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateError(TestValidationError)
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasError(TestValidationError)
|
||||
isNotValid()
|
||||
|
@ -88,7 +88,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateValidity(isValid = true)
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasNoError()
|
||||
isValid()
|
||||
|
@ -106,7 +106,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateValidity(isValid = false)
|
||||
|
||||
assertThat(result).all {
|
||||
isSameAs(initialInput)
|
||||
isSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasError(TestValidationError)
|
||||
isNotValid()
|
||||
|
@ -124,7 +124,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateError(TestValidationError2)
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasError(TestValidationError2)
|
||||
isNotValid()
|
||||
|
@ -142,7 +142,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateFromValidationResult(ValidationResult.Success)
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasNoError()
|
||||
isValid()
|
||||
|
@ -160,7 +160,7 @@ class InputFieldTest(
|
|||
val result = initialInput.updateFromValidationResult(ValidationResult.Failure(TestValidationError))
|
||||
|
||||
assertThat(result).all {
|
||||
isNotSameAs(initialInput)
|
||||
isNotSameInstanceAs(initialInput)
|
||||
hasValue(data.initialValue)
|
||||
hasError(TestValidationError)
|
||||
isNotValid()
|
||||
|
|
|
@ -154,7 +154,7 @@ mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:5.2.1"
|
|||
turbine = "app.cash.turbine:turbine:0.13.0"
|
||||
jdom2 = "org.jdom:jdom2:2.0.6.1"
|
||||
icu4j-charset = "com.ibm.icu:icu4j-charset:72.1"
|
||||
assertk = "com.willowtreeapps.assertk:assertk-jvm:0.27.0"
|
||||
assertk = "com.willowtreeapps.assertk:assertk-jvm:0.28.0"
|
||||
|
||||
leakcanary-android = "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import assertk.assertions.isEqualTo
|
|||
import assertk.assertions.isInstanceOf
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import assertk.assertions.isTrue
|
||||
import assertk.assertions.prop
|
||||
import com.fsck.k9.mail.filter.FixedLengthInputStream
|
||||
|
@ -370,7 +370,7 @@ class ImapResponseParserTest {
|
|||
|
||||
assertFailure {
|
||||
parser.readResponse(callback)
|
||||
}.isSameAs(exception)
|
||||
}.isSameInstanceAs(exception)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -8,7 +8,7 @@ import assertk.assertions.containsExactly
|
|||
import assertk.assertions.hasMessage
|
||||
import assertk.assertions.isInstanceOf
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.mail.AuthType
|
||||
import com.fsck.k9.mail.ConnectionSecurity
|
||||
import com.fsck.k9.mail.FolderType
|
||||
|
@ -264,7 +264,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnection)
|
||||
assertThat(result).isSameInstanceAs(imapConnection)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -277,8 +277,8 @@ class RealImapStoreTest {
|
|||
val resultOne = imapStore.getConnection()
|
||||
val resultTwo = imapStore.getConnection()
|
||||
|
||||
assertThat(resultOne).isSameAs(imapConnectionOne)
|
||||
assertThat(resultTwo).isSameAs(imapConnectionTwo)
|
||||
assertThat(resultOne).isSameInstanceAs(imapConnectionOne)
|
||||
assertThat(resultTwo).isSameInstanceAs(imapConnectionTwo)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -293,7 +293,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnection)
|
||||
assertThat(result).isSameInstanceAs(imapConnection)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -311,7 +311,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnectionTwo)
|
||||
assertThat(result).isSameInstanceAs(imapConnectionTwo)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -330,7 +330,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnectionTwo)
|
||||
assertThat(result).isSameInstanceAs(imapConnectionTwo)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -349,7 +349,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnectionTwo)
|
||||
assertThat(result).isSameInstanceAs(imapConnectionTwo)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -368,7 +368,7 @@ class RealImapStoreTest {
|
|||
|
||||
val result = imapStore.getConnection()
|
||||
|
||||
assertThat(result).isSameAs(imapConnectionTwo)
|
||||
assertThat(result).isSameInstanceAs(imapConnectionTwo)
|
||||
}
|
||||
|
||||
private fun createMockConnection(connectionGeneration: Int = 1): ImapConnection {
|
||||
|
|
|
@ -4,7 +4,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.hasSize
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.mail.AuthenticationFailedException
|
||||
import com.fsck.k9.mail.Body
|
||||
import com.fsck.k9.mail.FetchProfile
|
||||
|
@ -188,7 +188,7 @@ class Pop3FolderTest {
|
|||
|
||||
val message = folder.getMessage(MESSAGE_SERVER_ID)
|
||||
|
||||
assertThat(message).isSameAs(messageList.first())
|
||||
assertThat(message).isSameInstanceAs(messageList.first())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -225,7 +225,7 @@ class Pop3FolderTest {
|
|||
MIME-Version: 1.0
|
||||
Content-type: text/plain
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
|
||||
this is some test text.
|
||||
""".trimIndent().crlf().byteInputStream()
|
||||
folder.open()
|
||||
|
@ -233,7 +233,7 @@ class Pop3FolderTest {
|
|||
val fetchProfile = FetchProfile()
|
||||
fetchProfile.add(FetchProfile.Item.BODY)
|
||||
stubbing(connection) {
|
||||
on { readLine() } doReturn("1 100") doReturn(".")
|
||||
on { readLine() } doReturn "1 100" doReturn "."
|
||||
on { inputStream } doReturn messageInputStream
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.fsck.k9.mail.store.pop3
|
|||
|
||||
import assertk.assertThat
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isSameAs
|
||||
import assertk.assertions.isSameInstanceAs
|
||||
import com.fsck.k9.mail.AuthType
|
||||
import com.fsck.k9.mail.ConnectionSecurity
|
||||
import com.fsck.k9.mail.MessagingException
|
||||
|
@ -26,7 +26,7 @@ class Pop3StoreTest {
|
|||
val folderOne = store.getFolder("TestFolder")
|
||||
val folderTwo = store.getFolder("TestFolder")
|
||||
|
||||
assertThat(folderTwo).isSameAs(folderOne)
|
||||
assertThat(folderTwo).isSameInstanceAs(folderOne)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue