diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationServiceTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationServiceTest.kt index a1dffa7c64..df10c163a1 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationServiceTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationServiceTest.kt @@ -35,7 +35,7 @@ import org.matrix.rustcomponents.sdk.NotificationStatus import org.matrix.rustcomponents.sdk.TimelineEventType class RustNotificationServiceTest { - @Test + @Test fun test() = runTest { val notificationClient = FakeFfiNotificationClient( notificationItemResult = mapOf(AN_EVENT_ID.value to aRustBatchNotificationResult()), @@ -56,7 +56,7 @@ class RustNotificationServiceTest { ) } - @Test + @Test fun `test mapping invalid item only drops that item`() = runTest { val error = IllegalStateException("This event type is not supported") val faultyEvent = object : FakeFfiTimelineEvent() { @@ -83,7 +83,7 @@ class RustNotificationServiceTest { assertThat(successfulResult?.isSuccess).isTrue() } - @Test + @Test fun `test unable to resolve event`() = runTest { val notificationClient = FakeFfiNotificationClient( notificationItemResult = emptyMap(), @@ -95,7 +95,7 @@ class RustNotificationServiceTest { assertThat(exception).isInstanceOf(NotificationResolverException::class.java) } - @Test + @Test fun `close should invoke the close method of the service`() = runTest { val closeResult = lambdaRecorder { } val notificationClient = FakeFfiNotificationClient( diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notificationsettings/RustNotificationSettingsServiceTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notificationsettings/RustNotificationSettingsServiceTest.kt index e9a121679b..73b7b888b2 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notificationsettings/RustNotificationSettingsServiceTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notificationsettings/RustNotificationSettingsServiceTest.kt @@ -20,7 +20,7 @@ import org.junit.Test import org.matrix.rustcomponents.sdk.NotificationSettings class RustNotificationSettingsServiceTest { - @Test + @Test fun test() = runTest { val sut = createRustNotificationSettingsService() val result = sut.getRoomNotificationSettings( diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomdirectory/RustBaseRoomDirectoryServiceTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomdirectory/RustBaseRoomDirectoryServiceTest.kt index a873298f3e..ed97152311 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomdirectory/RustBaseRoomDirectoryServiceTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomdirectory/RustBaseRoomDirectoryServiceTest.kt @@ -14,7 +14,7 @@ import kotlinx.coroutines.test.runTest import org.junit.Test class RustBaseRoomDirectoryServiceTest { - @Test + @Test fun test() = runTest { val client = FakeFfiClient() val sut = RustRoomDirectoryService( diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactoryTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactoryTest.kt index 741ed93af8..ba45b310ef 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactoryTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactoryTest.kt @@ -16,7 +16,7 @@ import org.junit.Test import kotlin.coroutines.EmptyCoroutineContext class RoomListFactoryTest { - @Test + @Test fun `createRoomList should work`() = runTest { val sut = RoomListFactory( innerRoomListService = FakeFfiRoomListService(), diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryListProcessorTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryListProcessorTest.kt index 78c4f54626..022aa19ee7 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryListProcessorTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryListProcessorTest.kt @@ -28,7 +28,7 @@ import org.matrix.rustcomponents.sdk.RoomListEntriesUpdate class RoomSummaryListProcessorTest { private val summaries = MutableStateFlow>(emptyList()) - @Test + @Test fun `Append adds new entries at the end of the list`() = runTest { summaries.value = listOf(aRoomSummary()) val processor = createProcessor() @@ -40,7 +40,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value.subList(1, 4).all { it.roomId == A_ROOM_ID_2 }).isTrue() } - @Test + @Test fun `PushBack adds a new entry at the end of the list`() = runTest { summaries.value = listOf(aRoomSummary()) val processor = createProcessor() @@ -50,7 +50,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value.last().roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `PushFront inserts a new entry at the start of the list`() = runTest { summaries.value = listOf(aRoomSummary()) val processor = createProcessor() @@ -60,7 +60,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value.first().roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Set replaces an entry at some index`() = runTest { summaries.value = listOf(aRoomSummary()) val processor = createProcessor() @@ -72,7 +72,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Insert inserts a new entry at the provided index`() = runTest { summaries.value = listOf(aRoomSummary()) val processor = createProcessor() @@ -84,7 +84,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Remove removes an entry at some index`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), @@ -99,7 +99,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `PopBack removes an entry at the end of the list`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), @@ -114,7 +114,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID) } - @Test + @Test fun `PopFront removes an entry at the start of the list`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), @@ -129,7 +129,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Clear removes all the entries`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), @@ -142,7 +142,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value).isEmpty() } - @Test + @Test fun `Truncate removes all entries after the provided length`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), @@ -157,7 +157,7 @@ class RoomSummaryListProcessorTest { assertThat(summaries.value[index].roomId).isEqualTo(A_ROOM_ID) } - @Test + @Test fun `Reset removes all entries and add the provided ones`() = runTest { summaries.value = listOf( aRoomSummary(roomId = A_ROOM_ID), diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RoomSummaryListProcessorTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RoomSummaryListProcessorTest.kt index 253fd58dff..d21e259d42 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RoomSummaryListProcessorTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RoomSummaryListProcessorTest.kt @@ -24,7 +24,7 @@ import org.matrix.rustcomponents.sdk.SpaceListUpdate class RoomSummaryListProcessorTest { private val spaceRoomsFlow = MutableStateFlow>(emptyList()) - @Test + @Test fun `Append adds new entries at the end of the list`() = runTest { spaceRoomsFlow.value = listOf(aSpaceRoom()) val processor = createProcessor() @@ -36,7 +36,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value.subList(1, 4).all { it.roomId == A_ROOM_ID_2 }).isTrue() } - @Test + @Test fun `PushBack adds a new entry at the end of the list`() = runTest { spaceRoomsFlow.value = listOf(aSpaceRoom()) val processor = createProcessor() @@ -46,7 +46,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value.last().roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `PushFront inserts a new entry at the start of the list`() = runTest { spaceRoomsFlow.value = listOf(aSpaceRoom()) val processor = createProcessor() @@ -56,7 +56,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value.first().roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Set replaces an entry at some index`() = runTest { spaceRoomsFlow.value = listOf(aSpaceRoom()) val processor = createProcessor() @@ -68,7 +68,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Insert inserts a new entry at the provided index`() = runTest { spaceRoomsFlow.value = listOf(aSpaceRoom()) val processor = createProcessor() @@ -80,7 +80,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Remove removes an entry at some index`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -95,7 +95,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `PopBack removes an entry at the end of the list`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -110,7 +110,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID) } - @Test + @Test fun `PopFront removes an entry at the start of the list`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -125,7 +125,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID_2) } - @Test + @Test fun `Clear removes all the entries`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -138,7 +138,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value).isEmpty() } - @Test + @Test fun `Truncate removes all entries after the provided length`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -153,7 +153,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID) } - @Test + @Test fun `Reset removes all entries and add the provided ones`() = runTest { spaceRoomsFlow.value = listOf( aSpaceRoom(roomId = A_ROOM_ID), @@ -168,7 +168,7 @@ class RoomSummaryListProcessorTest { assertThat(spaceRoomsFlow.value[index].roomId).isEqualTo(A_ROOM_ID_3) } - @Test + @Test fun `When there is no replay cache SpaceListUpdateProcessor starts with an empty list`() = runTest { val spaceRoomsSharedFlow = MutableSharedFlow>(replay = 1) val processor = createProcessor( diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RustSpaceRoomListTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RustSpaceRoomListTest.kt index a0f8181c48..e966309c87 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RustSpaceRoomListTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/spaces/RustSpaceRoomListTest.kt @@ -29,7 +29,7 @@ import uniffi.matrix_sdk_ui.SpaceRoomListPaginationState import org.matrix.rustcomponents.sdk.SpaceRoomList as InnerSpaceRoomList class RustSpaceRoomListTest { - @Test + @Test fun `paginationStatusFlow emits values`() = runTest { val innerSpaceRoomList = FakeFfiSpaceRoomList( paginationStateResult = { SpaceRoomListPaginationState.Idle(false) } @@ -51,7 +51,7 @@ class RustSpaceRoomListTest { } } - @Test + @Test fun `spaceRoomsFlow emits values`() = runTest { val innerSpaceRoomList = FakeFfiSpaceRoomList( paginationStateResult = { SpaceRoomListPaginationState.Idle(false) } @@ -73,7 +73,7 @@ class RustSpaceRoomListTest { } } - @Test + @Test fun `paginate invokes paginate on the inner class`() = runTest { val paginateResult = lambdaRecorder { } val innerSpaceRoomList = FakeFfiSpaceRoomList( diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/MatrixTimelineDiffProcessorTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/MatrixTimelineDiffProcessorTest.kt index 9b5af1ffb4..308d2f66a6 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/MatrixTimelineDiffProcessorTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/MatrixTimelineDiffProcessorTest.kt @@ -30,7 +30,7 @@ class MatrixTimelineDiffProcessorTest { private val anEvent = MatrixTimelineItem.Event(A_UNIQUE_ID, anEventTimelineItem()) private val anEvent2 = MatrixTimelineItem.Event(A_UNIQUE_ID_2, anEventTimelineItem()) - @Test + @Test fun `Append adds new entries at the end of the list`() = runTest { timelineItems.value = listOf(anEvent) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -42,7 +42,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `PushBack adds a new entry at the end of the list`() = runTest { timelineItems.value = listOf(anEvent) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -54,7 +54,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `PushFront inserts a new entry at the start of the list`() = runTest { timelineItems.value = listOf(anEvent) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -66,7 +66,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `Set replaces an entry at some index`() = runTest { timelineItems.value = listOf(anEvent, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -78,7 +78,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `Insert inserts a new entry at the provided index`() = runTest { timelineItems.value = listOf(anEvent, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -91,7 +91,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `Remove removes an entry at some index`() = runTest { timelineItems.value = listOf(anEvent, MatrixTimelineItem.Other, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -103,7 +103,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `PopBack removes an entry at the end of the list`() = runTest { timelineItems.value = listOf(anEvent, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -114,7 +114,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `PopFront removes an entry at the start of the list`() = runTest { timelineItems.value = listOf(anEvent, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -125,7 +125,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `Clear removes all the entries`() = runTest { timelineItems.value = listOf(anEvent, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -133,7 +133,7 @@ class MatrixTimelineDiffProcessorTest { assertThat(timelineItems.value).isEmpty() } - @Test + @Test fun `Truncate removes all entries after the provided length`() = runTest { timelineItems.value = listOf(anEvent, MatrixTimelineItem.Other, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) @@ -144,7 +144,7 @@ class MatrixTimelineDiffProcessorTest { ) } - @Test + @Test fun `Reset removes all entries and add the provided ones`() = runTest { timelineItems.value = listOf(anEvent, MatrixTimelineItem.Other, anEvent2) val processor = createMatrixTimelineDiffProcessor(timelineItems) diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/TimelineItemsSubscriberTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/TimelineItemsSubscriberTest.kt index 607f575a2d..9a03374d7e 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/TimelineItemsSubscriberTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/TimelineItemsSubscriberTest.kt @@ -27,7 +27,7 @@ import uniffi.matrix_sdk_ui.EventItemOrigin @OptIn(ExperimentalCoroutinesApi::class) class TimelineItemsSubscriberTest { - @Test + @Test fun `when timeline emits an empty list of items, the flow must emits an empty list`() = runTest { val timelineItems: MutableSharedFlow> = MutableSharedFlow(replay = 1, extraBufferCapacity = Int.MAX_VALUE) @@ -50,7 +50,7 @@ class TimelineItemsSubscriberTest { } } - @Test + @Test fun `when timeline emits a non empty list of items, the flow must emits a non empty list`() = runTest { val timelineItems: MutableSharedFlow> = MutableSharedFlow(replay = 1, extraBufferCapacity = Int.MAX_VALUE) @@ -73,7 +73,7 @@ class TimelineItemsSubscriberTest { } } - @Test + @Test fun `when timeline emits an item with SYNC origin`() = runTest { val timelineItems: MutableSharedFlow> = MutableSharedFlow(replay = 1, extraBufferCapacity = Int.MAX_VALUE) @@ -104,7 +104,7 @@ class TimelineItemsSubscriberTest { } } - @Test + @Test fun `multiple subscriptions does not have side effect`() = runTest { val timelineItemsSubscriber = createTimelineItemsSubscriber() timelineItemsSubscriber.subscribeIfNeeded()