mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add unit test on UserProfileMapper
This commit is contained in:
committed by
Benoit Marty
parent
2514a7f710
commit
88004db531
+22
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024 New Vector Ltd.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
* Please see LICENSE in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.element.android.libraries.matrix.impl.usersearch
|
||||||
|
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
|
import io.element.android.libraries.matrix.api.user.MatrixUser
|
||||||
|
import io.element.android.libraries.matrix.test.A_USER_ID
|
||||||
|
import org.junit.Test
|
||||||
|
import org.matrix.rustcomponents.sdk.UserProfile
|
||||||
|
|
||||||
|
class UserProfileMapperTest {
|
||||||
|
@Test
|
||||||
|
fun map() {
|
||||||
|
assertThat(UserProfileMapper.map(UserProfile(A_USER_ID.value, "displayName", "avatarUrl")))
|
||||||
|
.isEqualTo(MatrixUser(A_USER_ID, "displayName", "avatarUrl"))
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user