FakeLoom

class FakeLoom : Loom

A test double for Loom that returns FakeSeam instances.

weave with Rendezvous.New seeds the seam's FakeSeam.selfId from the pattern's session name. For wired two-peer scenarios, prefer fakeSeamPair.

val loom = FakeLoom()
val seam = loom.host(Pattern("alice"))
// seam.selfId == PeerId("alice")

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
open override fun capability(): TransportCapability

FabricAvailability.Available is a fact here, not the guess Loom.capability()'s floor exists to refuse (#1746): weave constructs a FakeSeam in process and can never fail for a fabric reason — there is no socket, no permission and no radio to establish anything about.

Link copied to clipboard
open suspend fun host(pattern: Pattern): Seam
Link copied to clipboard
open suspend fun join(tag: Tag): Seam
Link copied to clipboard
open suspend override fun weave(rendezvous: Rendezvous): FakeSeam