Improve test coverage of SendActionState
This commit is contained in:
parent
ffa3719758
commit
9c88e806de
1 changed files with 26 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.messages.impl.attachments
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.features.messages.impl.attachments.preview.SendActionState
|
||||
import io.element.android.features.messages.impl.attachments.preview.aMediaUploadInfo
|
||||
import io.element.android.libraries.mediaupload.api.MediaUploadInfo
|
||||
import org.junit.Test
|
||||
|
||||
class SendActionStateTest {
|
||||
@Test
|
||||
fun `mediaUploadInfo() should return the value from Uploading class`() {
|
||||
val mediaUploadInfo: MediaUploadInfo = aMediaUploadInfo()
|
||||
val state: SendActionState = SendActionState.Sending.Uploading(
|
||||
progress = 0.5f,
|
||||
mediaUploadInfo = aMediaUploadInfo()
|
||||
)
|
||||
assertThat(state.mediaUploadInfo()).isEqualTo(mediaUploadInfo)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue