-
Notifications
You must be signed in to change notification settings - Fork 19
/
TestConversation.kt
151 lines (141 loc) · 5.42 KB
/
TestConversation.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* Wire
* Copyright (C) 2023 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*
*/
package com.wire.android.framework
import com.wire.kalium.logic.data.conversation.Conversation
import com.wire.kalium.logic.data.conversation.Conversation.Member
import com.wire.kalium.logic.data.conversation.Conversation.ProtocolInfo
import com.wire.kalium.logic.data.conversation.MutedConversationStatus
import com.wire.kalium.logic.data.id.ConversationId
import com.wire.kalium.logic.data.id.GroupID
import com.wire.kalium.logic.data.user.UserId
object TestConversation {
val ID = ConversationId("valueConvo", "domainConvo")
fun id(suffix: Int = 0) = ConversationId("valueConvo_$suffix", "domainConvo")
val ONE_ON_ONE = Conversation(
ID.copy(value = "1O1 ID"),
"ONE_ON_ONE Name",
Conversation.Type.ONE_ON_ONE,
TestTeam.TEAM_ID,
ProtocolInfo.Proteus,
MutedConversationStatus.AllAllowed,
null,
null,
null,
lastReadDate = "2022-03-30T15:36:00.000Z",
access = listOf(Conversation.Access.CODE, Conversation.Access.INVITE),
accessRole = listOf(Conversation.AccessRole.NON_TEAM_MEMBER, Conversation.AccessRole.GUEST),
creatorId = null,
receiptMode = Conversation.ReceiptMode.ENABLED,
messageTimer = null,
userMessageTimer = null,
archived = false,
archivedDateTime = null,
verificationStatus = Conversation.VerificationStatus.NOT_VERIFIED
)
val SELF = Conversation(
ID.copy(value = "SELF ID"),
"SELF Name",
Conversation.Type.SELF,
TestTeam.TEAM_ID,
ProtocolInfo.Proteus,
MutedConversationStatus.AllAllowed,
null,
null,
null,
lastReadDate = "2022-03-30T15:36:00.000Z",
access = listOf(Conversation.Access.CODE, Conversation.Access.INVITE),
accessRole = listOf(Conversation.AccessRole.NON_TEAM_MEMBER, Conversation.AccessRole.GUEST),
creatorId = null,
receiptMode = Conversation.ReceiptMode.ENABLED,
messageTimer = null,
userMessageTimer = null,
archived = false,
archivedDateTime = null,
verificationStatus = Conversation.VerificationStatus.NOT_VERIFIED
)
fun GROUP(protocolInfo: ProtocolInfo = ProtocolInfo.Proteus) = Conversation(
ID,
"GROUP Name",
Conversation.Type.GROUP,
TestTeam.TEAM_ID,
protocolInfo,
MutedConversationStatus.AllAllowed,
null,
null,
null,
lastReadDate = "2022-03-30T15:36:00.000Z",
access = listOf(Conversation.Access.CODE, Conversation.Access.INVITE),
accessRole = listOf(Conversation.AccessRole.NON_TEAM_MEMBER, Conversation.AccessRole.GUEST),
creatorId = null,
receiptMode = Conversation.ReceiptMode.ENABLED,
messageTimer = null,
userMessageTimer = null,
archived = false,
archivedDateTime = null,
verificationStatus = Conversation.VerificationStatus.NOT_VERIFIED
)
fun one_on_one(convId: ConversationId) = Conversation(
convId,
"ONE_ON_ONE Name",
Conversation.Type.ONE_ON_ONE,
TestTeam.TEAM_ID,
ProtocolInfo.Proteus,
MutedConversationStatus.AllAllowed,
null,
null,
null,
lastReadDate = "2022-03-30T15:36:00.000Z",
access = listOf(Conversation.Access.CODE, Conversation.Access.INVITE),
accessRole = listOf(Conversation.AccessRole.NON_TEAM_MEMBER, Conversation.AccessRole.GUEST),
creatorId = null,
receiptMode = Conversation.ReceiptMode.ENABLED,
messageTimer = null,
userMessageTimer = null,
archived = false,
archivedDateTime = null,
verificationStatus = Conversation.VerificationStatus.NOT_VERIFIED
)
val USER_1 = UserId("member1", "domainMember")
val MEMBER_TEST1 = Member(USER_1, Member.Role.Admin)
val USER_2 = UserId("member2", "domainMember")
val MEMBER_TEST2 = Member(USER_2, Member.Role.Member)
val GROUP_ID = GroupID("mlsGroupId")
val CONVERSATION = Conversation(
ConversationId("conv_id", "domain"),
"ONE_ON_ONE Name",
Conversation.Type.ONE_ON_ONE,
TestTeam.TEAM_ID,
ProtocolInfo.Proteus,
MutedConversationStatus.AllAllowed,
null,
null,
null,
access = listOf(Conversation.Access.CODE, Conversation.Access.INVITE),
accessRole = listOf(Conversation.AccessRole.NON_TEAM_MEMBER, Conversation.AccessRole.GUEST),
lastReadDate = "2022-03-30T15:36:00.000Z",
creatorId = null,
receiptMode = Conversation.ReceiptMode.ENABLED,
messageTimer = null,
userMessageTimer = null,
archived = false,
archivedDateTime = null,
verificationStatus = Conversation.VerificationStatus.NOT_VERIFIED
)
}