mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 09:56:00 +03:00
Fix tests
This commit is contained in:
parent
c2993a2a04
commit
3bcfd7c103
1 changed files with 11 additions and 2 deletions
|
@ -26,6 +26,7 @@ import org.matrix.android.sdk.MatrixTest
|
|||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
||||
import org.matrix.android.sdk.api.session.room.Room
|
||||
import org.matrix.android.sdk.api.session.room.members.MembershipService
|
||||
import org.matrix.android.sdk.api.session.room.model.Membership
|
||||
import org.matrix.android.sdk.api.session.room.model.RoomMemberContent
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageTextContent
|
||||
|
@ -148,14 +149,22 @@ class PushRulesConditionTest : MatrixTest {
|
|||
val room2JoinedId = "2joined"
|
||||
val room3JoinedId = "3joined"
|
||||
|
||||
val roomStub2Joined = mockk<Room> {
|
||||
val roomMembershipService2 = mockk<MembershipService> {
|
||||
every { getNumberOfJoinedMembers() } returns 2
|
||||
}
|
||||
|
||||
val roomStub3Joined = mockk<Room> {
|
||||
val roomMembershipService3 = mockk<MembershipService> {
|
||||
every { getNumberOfJoinedMembers() } returns 3
|
||||
}
|
||||
|
||||
val roomStub2Joined = mockk<Room> {
|
||||
every { membershipService() } returns roomMembershipService2
|
||||
}
|
||||
|
||||
val roomStub3Joined = mockk<Room> {
|
||||
every { membershipService() } returns roomMembershipService3
|
||||
}
|
||||
|
||||
val roomGetterStub = mockk<RoomGetter> {
|
||||
every { getRoom(room2JoinedId) } returns roomStub2Joined
|
||||
every { getRoom(room3JoinedId) } returns roomStub3Joined
|
||||
|
|
Loading…
Reference in a new issue