wowServer
Starts the Wow application App for a test, with profiles active, as wowServer of its class does.
wowServer<BankServer>("dev").use { server ->
val alice = Caller.of(subject = "alice")
server.commands(alice).wait(OpenAccount("Alice"), "alice")
server.queries(alice).snapshots(AccountState::class.java).state("alice")!!.state.owner.assert().isEqualTo("Alice")
}Starts the Wow application of application and sources for a test, with profiles active, and gives it back running: both its ports bound on the loopback interface, at ports the system chooses, and its drain, stop and wait timeouts short (TEST_PROPERTIES), so the test reaches it at once and closing it (WowServer.close) is quick. properties add to them and override them, as command-line arguments, over the application's own configuration; a null value leaves a key out. A clock is the node's: every wall time it and its stores read, so a test fixes or moves time in one place.
Its topics are in its JVM with no configuration: its internal port on the loopback interface makes it a node in development, so wow.transport=auto keeps its command topics and published streams in memory unless the application configures a transport. topics are those topics, given, when a test writes to them before the node starts (another context's published stream, say) or servers share them: the node takes them in place of its own, with wow.transport=memory, and leaves them open when it closes.
val topics = InMemoryTopics().apply { runBlocking { send("wow.eshop-ordering.order.state", listOf(message)) } }
wowServer<PaymentServer>("dev", topics = topics)peers are fakes of the services it calls (fakePeer): each one's context is called at its URL (wow.peers.<context>.url).