buildLog

fun buildLog(buildBlock: LogAssertionBuilder.() -> Unit): List<String>

A small DSL entry point for building expected log sequences in tests.

Usage:

val expected = buildLog {
addClientOutgoing("""{"method":"ping","jsonrpc":"2.0","id":"2"}""")
addServerIncoming("""{"method":"ping","jsonrpc":"2.0","id":"2"}""")
addServerOutgoing("""{"jsonrpc":"2.0","id":"2","result":{}}""")
addClientIncoming("""{"jsonrpc":"2.0","id":"2","result":{}}""")
}
assertLinesMatch(expected, log, "ping test")