FakeRoomFactory

A test double for RoomFactory that returns FakeRoom instances.

host seeds the room's FakeRoom.selfId from the pattern's display name and sets the role to SessionRole.Host. join does the same with SessionRole.Joiner.

For wired two-room scenarios, prefer fakeRoomPair.

val factory = FakeRoomFactory()
val room = factory.host(Pattern("alice"))
// room.selfId == PeerId("alice"), room.role.value == SessionRole.Host

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun host(pattern: Pattern): Room
Link copied to clipboard
open suspend override fun join(tag: Tag): Room