mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
add dummy initialization of Conversation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
22182d211d
commit
ac217163e9
@ -11,6 +11,8 @@ import com.nextcloud.talk.data.user.model.User
|
|||||||
import com.nextcloud.talk.models.domain.ConversationModel
|
import com.nextcloud.talk.models.domain.ConversationModel
|
||||||
import com.nextcloud.talk.models.json.capabilities.SpreedCapability
|
import com.nextcloud.talk.models.json.capabilities.SpreedCapability
|
||||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||||
|
import com.nextcloud.talk.models.json.conversations.ConversationEnums
|
||||||
|
import com.nextcloud.talk.models.json.participants.Participant
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@ -19,7 +21,53 @@ class ParticipantPermissionsTest : TestCase() {
|
|||||||
@Test
|
@Test
|
||||||
fun test_areFlagsSet() {
|
fun test_areFlagsSet() {
|
||||||
val spreedCapability = SpreedCapability()
|
val spreedCapability = SpreedCapability()
|
||||||
val conversation = Conversation(null, null)
|
val conversation = Conversation(
|
||||||
|
token = "test",
|
||||||
|
name = "test",
|
||||||
|
displayName = "test",
|
||||||
|
description = "test",
|
||||||
|
type = ConversationEnums.ConversationType.DUMMY,
|
||||||
|
lastPing = 1,
|
||||||
|
participantType = Participant.ParticipantType.DUMMY,
|
||||||
|
hasPassword = true,
|
||||||
|
sessionId = "test",
|
||||||
|
actorId = "test",
|
||||||
|
actorType = "test",
|
||||||
|
password = "test",
|
||||||
|
favorite = false,
|
||||||
|
lastActivity = 1,
|
||||||
|
unreadMessages = 1,
|
||||||
|
unreadMention = false,
|
||||||
|
lastMessage = null,
|
||||||
|
objectType = ConversationEnums.ObjectType.DEFAULT,
|
||||||
|
notificationLevel = ConversationEnums.NotificationLevel.ALWAYS,
|
||||||
|
conversationReadOnlyState = ConversationEnums.ConversationReadOnlyState.CONVERSATION_READ_WRITE,
|
||||||
|
lobbyState = ConversationEnums.LobbyState.LOBBY_STATE_ALL_PARTICIPANTS,
|
||||||
|
lobbyTimer = 1,
|
||||||
|
lastReadMessage = 1,
|
||||||
|
lastCommonReadMessage = 1,
|
||||||
|
hasCall = true,
|
||||||
|
callFlag = 1,
|
||||||
|
canStartCall = false,
|
||||||
|
canLeaveConversation = true,
|
||||||
|
canDeleteConversation = true,
|
||||||
|
unreadMentionDirect = true,
|
||||||
|
notificationCalls = 1,
|
||||||
|
permissions = 1,
|
||||||
|
messageExpiration = 1,
|
||||||
|
status = "test",
|
||||||
|
statusIcon = "test",
|
||||||
|
statusMessage = "test",
|
||||||
|
statusClearAt = 1,
|
||||||
|
callRecording = 1,
|
||||||
|
avatarVersion = "test",
|
||||||
|
hasCustomAvatar = true,
|
||||||
|
callStartTime = 1,
|
||||||
|
recordingConsentRequired = 1,
|
||||||
|
remoteServer = "",
|
||||||
|
remoteToken = ""
|
||||||
|
)
|
||||||
|
|
||||||
conversation.permissions = ParticipantPermissions.PUBLISH_SCREEN or
|
conversation.permissions = ParticipantPermissions.PUBLISH_SCREEN or
|
||||||
ParticipantPermissions.JOIN_CALL or
|
ParticipantPermissions.JOIN_CALL or
|
||||||
ParticipantPermissions.DEFAULT
|
ParticipantPermissions.DEFAULT
|
||||||
|
Loading…
Reference in New Issue
Block a user