testing library

A plugin host for tests: PluginTestHost, over a loop, a bus and a component registry that write down what a plugin registers.

The registries are the engine's to implement. A class outside the engine that extends LoopRegistry, EventRegistry or ComponentRegistry is not covered by the plugin API's versioning: their calls grow by optional named parameters in a minor, which every caller leaves out and every override must add. These fakes are kept compiling by the engine instead, and flutter3d_testing exports them.

Classes

PluginTestHost
A plugin host for a test: a PluginManager over a TestLoop, a TestEvents and a TestComponents that write down what a plugin registers, beside the engine's registries a test hands it.
TestComponents
The component codecs a world would know, written down, with nothing saved.
TestEvents
A bus that writes down what is declared, subscribed and published, and delivers only what a test hands it (show, deliverStep).
TestLoop
A loop that writes down the phases, systems and assimilations added to it, and runs nothing.
TestPhase
One phase a TestLoop was handed, with its constraints and who added it.
TestSnapshots
The snapshot parts a world would capture, held in memory: what host.registry<SnapshotRegistry>() answers in a PluginTestHost.
TestSubscription
One subscription a TestEvents was handed.
TestSystem
One system a TestLoop was handed, with what it declared and who added it.