MockFateBackend
Keeps everything it is given, for tests that want to check what robot code logged.
val time = TestTimeSource()
val registry = FateRegistry(time)
val mock = MockFateBackend().also(registry::register)
registry.table("Drive").log("left", 1.5)
assertEquals(listOf(1.5), mock.valuesAt("Drive/left"))Content copied to clipboard
It is safe to log from several threads. The inspection methods return copies, which can be stale if logging is still running.