Fix test compilation and fixture.

This commit is contained in:
Benoit Marty
2023-11-30 16:07:20 +01:00
parent 87158e7321
commit 602eb9be2e

View File

@@ -75,7 +75,6 @@ class DefaultRoomLastMessageFormatterTest {
val stringProvider = AndroidStringProvider(context.resources)
formatter = DefaultRoomLastMessageFormatter(
sp = AndroidStringProvider(context.resources),
matrixClient = fakeMatrixClient,
roomMembershipContentFormatter = RoomMembershipContentFormatter(fakeMatrixClient, stringProvider),
profileChangeContentFormatter = ProfileChangeContentFormatter(stringProvider),
stateContentFormatter = StateContentFormatter(stringProvider)
@@ -798,6 +797,11 @@ class DefaultRoomLastMessageFormatterTest {
private fun createRoomEvent(sentByYou: Boolean, senderDisplayName: String?, content: EventContent): EventTimelineItem {
val sender = if (sentByYou) A_USER_ID else UserId("@someone_else:domain")
val profile = ProfileTimelineDetails.Ready(senderDisplayName, false, null)
return anEventTimelineItem(content = content, senderProfile = profile, sender = sender)
return anEventTimelineItem(
content = content,
senderProfile = profile,
sender = sender,
isOwn = sentByYou,
)
}
}