core.testing / MockNetwork / <init>

# <init>

`MockNetwork(threadPerNode: Boolean = false, defaultFactory: Factory = MockNetwork.DefaultFactory)`

A mock node brings up a suite of in-memory services in a fast manner suitable for unit testing. Components that do IO are either swapped out for mocks, or pointed to a Jimfs in memory filesystem.

Mock network nodes require manual pumping by default: they will not run asynchronous. This means that for message exchanges to take place (and associated handlers to run), you must call the runNetwork method.