Package-level declarations
Types
Link copied to clipboard
@RequiresOptIn(message = "Builds a request no joiner proved. For tests only; no stability promise.", level = RequiresOptIn.Level.ERROR)
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY] )
Marks test-only ways to build what only a room builds in production. For tests; no stability promise.
Link copied to clipboard
class FakeRoom(val selfId: PeerId = PeerId("self"), initialRole: SessionRole = SessionRole.Host, initialRoster: Set<Member> = emptySet(), val channelPolicy: DeliveryPolicy = DeliveryPolicy.Reliable, initialRoomId: RoomId? = if (initialRole == SessionRole.Host) mintFakeRoomId(selfId) else null, memberInboxCapacity: Int = FAKE_MEMBER_INBOX_CAPACITY) : Room
A test double for Room with test-driver helpers for roster manipulation, event delivery, and outgoing-frame inspection.
Link copied to clipboard
A test double for RoomFactory that returns FakeRoom instances.
Functions
Link copied to clipboard
Builds the AdmissionRequest a room would hand your AdmissionPolicy for a newcomer holding key, so you can test decide without standing up a room.
Link copied to clipboard
suspend fun fakeRoomPair(hostId: PeerId = PeerId("host"), joinerId: PeerId = PeerId("joiner")): Pair<FakeRoom, FakeRoom>
Build a wired pair of FakeRooms whose FakeRoom.broadcast calls cross-deliver into the other room's Room.incoming, matching the behaviour of a real two-peer room.